Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp574617ybd; Wed, 26 Jun 2019 03:08:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNvKsd2DDlmCwvSgHlzfs0LNOalA+uVtqVUi+Q5IB5fxTnqo4TzKDjZYDwts8uGOCXMLoe X-Received: by 2002:a63:4d63:: with SMTP id n35mr2165793pgl.43.1561543715906; Wed, 26 Jun 2019 03:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561543715; cv=none; d=google.com; s=arc-20160816; b=l3uYYyI8qZMK9VECWUh6PWTSB9Dd2H3vgHrbss3LHA/JPfQMZHjaKJlsm1XX1SCSr5 uGYUsp9xHyZ21Nr0T8ZAF8tiQebZfbADffCed778GBrgg6E0aEWQXfiEiQETtqdFCjUw G0zk9OhSDSXXX8EtR2Bmeym/z4XKIZdenGvU18qn/xU1UtfA3E5PAwAJkztBniLrjrwb o+q8Tg4flOgr5XRi93vLs93ReoFeWze6qeV/NgHl8XU7bczuJx42bU3yUxrJaqGSBybv /9NnZb8/Eh/XK64KeoEqjKyNZTSG+f4LaN+hy4306V7n1rSDMDsSfk2hSBA04vxUprxy ISzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lA6WHOHvwnqcXTXfllIH/9q+Q3SBJoDs9qjbJsWJXYo=; b=m1+E+3IPSJcthHvIfyfYccAMAvNRKDVhYJzjKMrN70DyMAVlM+stT/HId7X9Fn9FEW zEYVs97uLyB/K/UCQLE0vNxcb54fng3zluEkiulxAA5z6jkQ/QFo+HlHNMAfYvT19Gx0 cgu3MvBBLo0LdtEJD1BOMNCozthb5CEl5dN2UhhU6uh72o7gLrwIjTqY3lqRGbda3D/x Vf8Dey91nrzHLPKQ1WApeXDpLKwVlPyZkk5lwes+qZKBCJzkqGlMwkLL3GZjsLX6UMi1 vTX3GXfiInl2PkzjCOP3yifro3M7Gc2J8uNPObxwxqi4CocZtNWqON1IUPBQOLmxHeua d3SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=JxHjA63R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14si2834088plp.242.2019.06.26.03.08.19; Wed, 26 Jun 2019 03:08:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=JxHjA63R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbfFZKGO (ORCPT + 99 others); Wed, 26 Jun 2019 06:06:14 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38497 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbfFZKGN (ORCPT ); Wed, 26 Jun 2019 06:06:13 -0400 Received: by mail-wm1-f65.google.com with SMTP id s15so1447791wmj.3 for ; Wed, 26 Jun 2019 03:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lA6WHOHvwnqcXTXfllIH/9q+Q3SBJoDs9qjbJsWJXYo=; b=JxHjA63RdBaeJkw3kbpH30q43ofn69cZUNRv4WbfUfGPNuzqfzd0T/hFMTA9tsXwLN bbRY1TP83zgESaLDObC8hOeSLczI8ydawaziKj6FoSkjyBO074/dPnxLYw6A7kQ2bcyj bcEVMuaDcqxfXn0c/sJZneTf14QP2QFJoKohRFBqi3GvHYGwceqGWF6jnm+eb70Ps8xU Ha4WuoCAJ+oqxTrCqMLEo02JqHhl0Ede6YOMDUER13NIoynVi2EwRbxKA5OtQkUBw0Le x74neMxRBGwFKgoEahX+AHm2XA6MWNwWb4OS1UWXn8y4OOH0sVXLxIP4Fss8dD4EwY45 krpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lA6WHOHvwnqcXTXfllIH/9q+Q3SBJoDs9qjbJsWJXYo=; b=OyIfj5AHvz13wo9/soPVgmuAxKkw/VrUqutlRLYeG70aMZm/WVYj1X5lcapMJARy/Q EhyMG2sElxjDDDjotbj2aWGA4M+5CzNgDT0AUbUJSaKmB09iFCoa+KuWTiUHxUuDUM5f bnCeHIJSZWY1eNxfT/il8p98YphHB6Wj4ub/5E8DGbkNYqSXnrp1jMozP53yTCXvifC5 QVCK1fchxiRqMbs5O9nrCqJ13yjJ6xtE9Dzef95mVdsBrSQG4385hjMgtmBH1sgiGAIv uyW3e4xoqd6UoQrnF7imRaynzCJeCN8ANQgpzosLYAtiUmYLq+lv6vXJthVpPic7FV3W JqwA== X-Gm-Message-State: APjAAAX0olJCnVn9/OwBt3AYnf29LYxIlF0Bpd91fJG4P7kds9x2e6qc FKbhSYBRyViHLxvBBJ7tnXwT8Q== X-Received: by 2002:a1c:ca06:: with SMTP id a6mr2195048wmg.48.1561543571691; Wed, 26 Jun 2019 03:06:11 -0700 (PDT) Received: from brauner.io ([212.91.227.56]) by smtp.gmail.com with ESMTPSA id f197sm2333661wme.39.2019.06.26.03.06.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 03:06:11 -0700 (PDT) Date: Wed, 26 Jun 2019 12:06:10 +0200 From: Christian Brauner To: David Howells Cc: viro@zeniv.linux.org.uk, raven@themaw.net, mszeredi@redhat.com, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/25] vfs: Allow fsinfo() to query what's in an fs_context [ver #14] Message-ID: <20190626100609.jerxqozukygyojik@brauner.io> References: <20190625092728.z3jn3gbyopzcg2it@brauner.io> <156138532485.25627.7459410522109581052.stgit@warthog.procyon.org.uk> <156138535407.25627.15015993364565647650.stgit@warthog.procyon.org.uk> <6575.1561543379@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6575.1561543379@warthog.procyon.org.uk> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 11:02:59AM +0100, David Howells wrote: > Christian Brauner wrote: > > > > + ret = mutex_lock_interruptible(&fc->uapi_mutex); > > > + if (ret == 0) { > > > + ret = -EIO; > > > > Why EIO when there's no root dentry? > > Because I don't want to use ENODATA/EBADF and preferably not EINVAL and > because the context you're accessing isn't in the correct state for you to be > able to do that. How about EBADFD ("File descriptor in bad state")? Do we have that? If so that sounds good. Christian