aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index f356719c2413..24ad4a8963df 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4394,8 +4394,9 @@ int vfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *oldname)
{
struct user_namespace *mnt_userns = mnt_idmap_owner(idmap);
- int error = may_create(mnt_userns, dir, dentry);
+ int error;
+ error = may_create(mnt_userns, dir, dentry);
if (error)
return error;
@@ -4406,7 +4407,7 @@ int vfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
if (error)
return error;
- error = dir->i_op->symlink(mnt_userns, dir, dentry, oldname);
+ error = dir->i_op->symlink(idmap, dir, dentry, oldname);
if (!error)
fsnotify_create(dir, dentry);
return error;