Skip to content

Commit 508c877

Browse files
author
Al Viro
committed
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: d41efb5 "fs/namei.c: pull positivity check into follow_managed()" Reported-by: Ian Kent <[email protected]> Tested-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent c64cd6e commit 508c877

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/namei.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,7 @@ static int follow_managed(struct path *path, struct nameidata *nd)
12321232
BUG_ON(!path->dentry->d_op);
12331233
BUG_ON(!path->dentry->d_op->d_manage);
12341234
ret = path->dentry->d_op->d_manage(path, false);
1235+
flags = smp_load_acquire(&path->dentry->d_flags);
12351236
if (ret < 0)
12361237
break;
12371238
}

0 commit comments

Comments
 (0)