Commit 01183609 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 3f6d9e08 97242f99
...@@ -1954,8 +1954,13 @@ static int link_path_walk(const char *name, struct nameidata *nd) ...@@ -1954,8 +1954,13 @@ static int link_path_walk(const char *name, struct nameidata *nd)
continue; 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; return -ENOTDIR;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment