lkml.org 
[lkml]   [2014]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] VFS: allow ->d_manage() to declare -EISDIR in rcu_walk mode.
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



\
 
 \ /
  Last update: 2014-08-01 11:21    [W:0.087 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site