All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: NeilBrown <neilb@suse.de>
Cc: Al Viro <viro@ZenIV.linux.org.uk>, Ian Kent <raven@themaw.net>,
	autofs@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] VFS: allow ->d_manage() to declare -EISDIR in rcu_walk mode.
Date: Fri, 1 Aug 2014 11:33:18 +0300	[thread overview]
Message-ID: <20140801083318.GA4907@mwanda> (raw)
In-Reply-To: <20140730160833.5eac00ec@notabene.brown>

On Wed, Jul 30, 2014 at 04:08:33PM +1000, NeilBrown wrote:
> @@ -1110,11 +1110,16 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
>  		 * Don't forget we might have a non-mountpoint managed dentry
>  		 * that wants to block transit.
>  		 */
> -		if (unlikely(managed_dentry_might_block(path->dentry)))
> +		switch (managed_dentry_rcu(path->dentry)) {
> +		case -ECHILD:
> +		default:
>  			return false;
> +		case -EISDIR:
> +			return true;
> +		}
>  

Smatch says that any lines after that switch statement are unreachable.

Is the "default" intended?

>  		if (!d_mountpoint(path->dentry))
> -			return true;
> +			return !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
>  
>  		mounted = __lookup_mnt(path->mnt, path->dentry);
>  		if (!mounted)

regards,
dan carpenter


  parent reply	other threads:[~2014-08-01  8:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30  6:08 [PATCH] VFS: allow ->d_manage() to declare -EISDIR in rcu_walk mode NeilBrown
2014-07-30 20:16 ` Christoph Hellwig
2014-07-30 23:49   ` NeilBrown
2014-08-01  8:33 ` Dan Carpenter [this message]
2014-08-01  8:48   ` NeilBrown
2014-08-04  7:06     ` [PATCH - V2] " NeilBrown
2014-08-04  8:57       ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140801083318.GA4907@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=autofs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=raven@themaw.net \
    --cc=rdunlap@infradead.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.