Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Aug 2, 2015
2 parents 3f6d9e0 + 97242f9 commit 0118360
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
@@ -1954,8 +1954,13 @@ static int link_path_walk(const char *name, struct nameidata *nd)
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;
}
}
}

0 comments on commit 0118360

Please sign in to comment.