Skip to content

Commit 0118360

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS fix from Al Viro: "Spurious ENOTDIR fix" This should fix the problems reported by Dominique Martinet and Hugh Dickins. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: link_path_walk(): be careful when failing with ENOTDIR
2 parents 3f6d9e0 + 97242f9 commit 0118360

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/namei.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1954,8 +1954,13 @@ static int link_path_walk(const char *name, struct nameidata *nd)
19541954
continue;
19551955
}
19561956
}
1957-
if (unlikely(!d_can_lookup(nd->path.dentry)))
1957+
if (unlikely(!d_can_lookup(nd->path.dentry))) {
1958+
if (nd->flags & LOOKUP_RCU) {
1959+
if (unlazy_walk(nd, NULL, 0))
1960+
return -ECHILD;
1961+
}
19581962
return -ENOTDIR;
1963+
}
19591964
}
19601965
}
19611966

0 commit comments

Comments
 (0)