fs: port vfs_*() helpers to struct mnt_idmap
[linux-block.git] / fs / inode.c
index f453eb58fd03de04b32837af37d4f0701e8ae16f..84b5da325ee856d4564dfabd1c088b8e2798f08a 100644 (file)
@@ -1972,7 +1972,7 @@ int dentry_needs_remove_privs(struct user_namespace *mnt_userns,
        return mask;
 }
 
-static int __remove_privs(struct user_namespace *mnt_userns,
+static int __remove_privs(struct mnt_idmap *idmap,
                          struct dentry *dentry, int kill)
 {
        struct iattr newattrs;
@@ -1982,7 +1982,7 @@ static int __remove_privs(struct user_namespace *mnt_userns,
         * Note we call this on write, so notify_change will not
         * encounter any conflicting delegations:
         */
-       return notify_change(mnt_userns, dentry, &newattrs, NULL);
+       return notify_change(idmap, dentry, &newattrs, NULL);
 }
 
 static int __file_remove_privs(struct file *file, unsigned int flags)
@@ -2003,7 +2003,7 @@ static int __file_remove_privs(struct file *file, unsigned int flags)
                if (flags & IOCB_NOWAIT)
                        return -EAGAIN;
 
-               error = __remove_privs(file_mnt_user_ns(file), dentry, kill);
+               error = __remove_privs(file_mnt_idmap(file), dentry, kill);
        }
 
        if (!error)