aboutsummaryrefslogtreecommitdiffstats
path: root/fs
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 /fs
parentMerge tag 'dmaengine-fix-4.2-rc5' of git://git.infradead.org/users/vkoul/slave-dma (diff)
parentlink_path_walk(): be careful when failing with ENOTDIR (diff)
downloadlinux-dev-01183609ab61d11f1c310d42552a97be3051cc0f.tar.xz
linux-dev-01183609ab61d11f1c310d42552a97be3051cc0f.zip
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
Diffstat (limited to 'fs')
-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;
+ }
}
}