summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-08-01 17:42:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-08-01 17:42:14 -0700
commit01183609ab61d11f1c310d42552a97be3051cc0f (patch)
tree578a0d68ae248a0dbd3133438cfcf9f15ff028c5
parent3f6d9e0896b325c95e5155ee8e7bcb47443ad413 (diff)
parent97242f99a013950af63effa0732f8ef7db4e31ec (diff)
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
-rw-r--r--fs/namei.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index ae4e4c18b2ac..fbbcf0993312 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1954,8 +1954,13 @@ OK:
continue;
}
}
- if (unlikely(!d_can_lookup(nd->path.dentry)))
+ if (unlikely(!d_can_lookup(nd->path.dentry))) {
+ if (nd->flags & LOOKUP_RCU) {
+ if (unlazy_walk(nd, NULL, 0))
+ return -ECHILD;
+ }
return -ENOTDIR;
+ }
}
}