From: Andrew Morton Repair git-unionfs after partially-fix-up-the-lookup_one_noperm-mess.patch Cc: Christoph Hellwig Cc: Josef 'Jeff' Sipek Cc: Miklos Szeredi Cc: Al Viro Signed-off-by: Andrew Morton --- fs/namei.c | 3 ++- include/linux/namei.h | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff -puN fs/namei.c~git-unionfs-fixup fs/namei.c --- a/fs/namei.c~git-unionfs-fixup +++ a/fs/namei.c @@ -1357,7 +1357,8 @@ static int __lookup_one_len(const char * * nameidata argument is passed to the filesystem methods and a filesystem * using this helper needs to be prepared for that. */ -struct dentry *lookup_one_len(const char *name, struct dentry *base, int len) +struct dentry *lookup_one_len_nd(const char *name, struct dentry *base, int len, + struct nameidata *nd) { int err; struct qstr this; diff -puN include/linux/namei.h~git-unionfs-fixup include/linux/namei.h --- a/include/linux/namei.h~git-unionfs-fixup +++ a/include/linux/namei.h @@ -82,9 +82,16 @@ extern struct file *lookup_instantiate_f extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); extern void release_open_intent(struct nameidata *); -extern struct dentry *lookup_one_len(const char *, struct dentry *, int); +extern struct dentry *lookup_one_len_nd(const char *, struct dentry *, + int, struct nameidata *); extern struct dentry *lookup_one_noperm(const char *, struct dentry *); +static inline struct dentry *lookup_one_len(const char *name, + struct dentry *dir, int len) +{ + return lookup_one_len_nd(name, dir, len, NULL); +} + extern int follow_down(struct vfsmount **, struct dentry **); extern int follow_up(struct vfsmount **, struct dentry **); _