--- a/fs/aufs/export.c +++ a/fs/aufs/export.c @@ -353,7 +353,7 @@ static struct dentry *au_lkup_by_ino(struct path *path, ino_t ino) LKTRTrace("%.*s, i%lu\n", AuDLNPair(parent), (unsigned long )ino); path_get(path); - file = dentry_open(parent, path->mnt, au_dir_roflags); + file = dentry_open(parent, path->mnt, au_dir_roflags, current_cred()); dentry = (void *)file; if (IS_ERR(file)) goto out; --- a/fs/aufs/file.c +++ a/fs/aufs/file.c @@ -99,7 +99,8 @@ struct file *au_h_open(struct dentry *dentry, aufs_bindex_t bindex, int flags, if (unlikely(file && au_test_nfs(h_dentry->d_sb))) h_file = au_h_intent(dentry, bindex, file); if (!h_file) - h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags); + h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags, + current_cred()); /* * a dirty trick for handling FMODE_EXEC and deny_write_access(). --- a/fs/aufs/inode.c +++ a/fs/aufs/inode.c @@ -404,7 +404,7 @@ int au_test_ro(struct super_block *sb, aufs_bindex_t bindex, int au_test_h_perm(struct inode *h_inode, int mask, int dlgt) { - if (!current->fsuid) + if (!current_fsuid()) return 0; /* todo: fake nameidata? */ return vfsub_permission(h_inode, mask, NULL, dlgt); --- a/fs/aufs/whout.c +++ a/fs/aufs/whout.c @@ -276,7 +276,7 @@ static int do_unlink_wh(struct au_hinode *hdir, struct inode *h_dir, */ vfsub_args_init(&vargs, &ign, dlgt, (h_dir->i_mode & S_ISVTX) - && wh_dentry->d_inode->i_uid != current->fsuid); + && wh_dentry->d_inode->i_uid != current_fsuid()); vfsub_ign_hinode(&vargs, IN_DELETE, hdir); err = vfsub_unlink(h_dir, wh_dentry, &vargs); AuTraceErr(err); @@ -591,7 +591,7 @@ static void reinit_br_wh(void *arg) struct vfsub_args vargs; AuTraceEnter(); - AuDebugOn(current->fsuid); + AuDebugOn(current_fsuid()); err = 0; wbr = a->br->br_wbr; --- a/fs/aufs/xino.c +++ a/fs/aufs/xino.c @@ -623,7 +623,8 @@ struct file *au_xino_create2(struct super_block *sb, struct file *base_file, goto out_dput; } file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt), - O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE); + O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, + current_cred()); if (IS_ERR(file)) { AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file)); goto out_dput; --- a/fs/aufs25/export.c +++ a/fs/aufs25/export.c @@ -353,7 +353,7 @@ static struct dentry *au_lkup_by_ino(struct path *path, ino_t ino) LKTRTrace("%.*s, i%lu\n", AuDLNPair(parent), (unsigned long )ino); path_get(path); - file = dentry_open(parent, path->mnt, au_dir_roflags); + file = dentry_open(parent, path->mnt, au_dir_roflags, current_cred()); dentry = (void *)file; if (IS_ERR(file)) goto out; --- a/fs/aufs25/file.c +++ a/fs/aufs25/file.c @@ -99,7 +99,8 @@ struct file *au_h_open(struct dentry *dentry, aufs_bindex_t bindex, int flags, if (unlikely(file && au_test_nfs(h_dentry->d_sb))) h_file = au_h_intent(dentry, bindex, file); if (!h_file) - h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags); + h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags, + current_cred()); /* * a dirty trick for handling FMODE_EXEC and deny_write_access(). --- a/fs/aufs25/inode.c +++ a/fs/aufs25/inode.c @@ -404,7 +404,7 @@ int au_test_ro(struct super_block *sb, aufs_bindex_t bindex, int au_test_h_perm(struct inode *h_inode, int mask, int dlgt) { - if (!current->fsuid) + if (!current_fsuid()) return 0; /* todo: fake nameidata? */ return vfsub_permission(h_inode, mask, NULL, dlgt); --- a/fs/aufs25/whout.c +++ a/fs/aufs25/whout.c @@ -276,7 +276,7 @@ static int do_unlink_wh(struct au_hinode *hdir, struct inode *h_dir, */ vfsub_args_init(&vargs, &ign, dlgt, (h_dir->i_mode & S_ISVTX) - && wh_dentry->d_inode->i_uid != current->fsuid); + && wh_dentry->d_inode->i_uid != current_fsuid()); vfsub_ign_hinode(&vargs, IN_DELETE, hdir); err = vfsub_unlink(h_dir, wh_dentry, &vargs); AuTraceErr(err); @@ -591,7 +591,7 @@ static void reinit_br_wh(void *arg) struct vfsub_args vargs; AuTraceEnter(); - AuDebugOn(current->fsuid); + AuDebugOn(current_fsuid()); err = 0; wbr = a->br->br_wbr; --- a/fs/aufs25/xino.c +++ a/fs/aufs25/xino.c @@ -623,7 +623,8 @@ struct file *au_xino_create2(struct super_block *sb, struct file *base_file, goto out_dput; } file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt), - O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE); + O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, + current_cred()); if (IS_ERR(file)) { AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file)); goto out_dput;