fs: make helpers idmap mount aware
[sfrench/cifs-2.6.git] / fs / configfs / symlink.c
index cb61467478ca81f973ad22a65296c8b41079ed56..77c854364e6092a8ef13b41301d143bed2bedac8 100644 (file)
@@ -139,7 +139,8 @@ static int get_target(const char *symname, struct path *path,
 }
 
 
-int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
+int configfs_symlink(struct user_namespace *mnt_userns, struct inode *dir,
+                    struct dentry *dentry, const char *symname)
 {
        int ret;
        struct path path;
@@ -197,7 +198,8 @@ int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symna
        if (dentry->d_inode || d_unhashed(dentry))
                ret = -EEXIST;
        else
-               ret = inode_permission(dir, MAY_WRITE | MAY_EXEC);
+               ret = inode_permission(&init_user_ns, dir,
+                                      MAY_WRITE | MAY_EXEC);
        if (!ret)
                ret = type->ct_item_ops->allow_link(parent_item, target_item);
        if (!ret) {