aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-01-14 22:09:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2020-01-15 01:36:46 -0500
commit508c8772760d4ef9c1a044519b564710c3684fc5 (patch)
tree0a631ad4a9b355104f8b4951c462e454d4ddae3a /fs/namei.c
parentreimplement path_mountpoint() with less magic (diff)
downloadlinux-dev-508c8772760d4ef9c1a044519b564710c3684fc5.tar.xz
linux-dev-508c8772760d4ef9c1a044519b564710c3684fc5.zip
fix autofs regression caused by follow_managed() changes
we need to reload ->d_flags after the call of ->d_manage() - the thing might've been called with dentry still negative and have the damn thing turned positive while we'd waited. Fixes: d41efb522e90 "fs/namei.c: pull positivity check into follow_managed()" Reported-by: Ian Kent <raven@themaw.net> Tested-by: Ian Kent <raven@themaw.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 204677c37751..d2720dc71d0e 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1232,6 +1232,7 @@ static int follow_managed(struct path *path, struct nameidata *nd)
BUG_ON(!path->dentry->d_op);
BUG_ON(!path->dentry->d_op->d_manage);
ret = path->dentry->d_op->d_manage(path, false);
+ flags = smp_load_acquire(&path->dentry->d_flags);
if (ret < 0)
break;
}