aboutsummaryrefslogtreecommitdiff
path: root/fs/remap_range.c
diff options
context:
space:
mode:
authorGravatar Christian Brauner <brauner@kernel.org> 2022-06-22 22:12:16 +0200
committerGravatar Christian Brauner (Microsoft) <brauner@kernel.org> 2022-10-26 10:02:34 +0200
commita2bd096fb2d7f50fb4db246b33e7bfcf5e2eda3a (patch)
treef51ed8d520fcc0ae36e9a4cd3ea19a33968bad21 /fs/remap_range.c
parentmnt_idmapping: add missing helpers (diff)
downloadlinux-a2bd096fb2d7f50fb4db246b33e7bfcf5e2eda3a.tar.gz
linux-a2bd096fb2d7f50fb4db246b33e7bfcf5e2eda3a.tar.bz2
linux-a2bd096fb2d7f50fb4db246b33e7bfcf5e2eda3a.zip
fs: use type safe idmapping helpers
We already ported most parts and filesystems over for v6.0 to the new vfs{g,u}id_t type and associated helpers for v6.0. Convert the remaining places so we can remove all the old helpers. This is a non-functional change. Reviewed-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'fs/remap_range.c')
-rw-r--r--fs/remap_range.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/remap_range.c b/fs/remap_range.c
index 654912d06862..290743c8d226 100644
--- a/fs/remap_range.c
+++ b/fs/remap_range.c
@@ -429,7 +429,7 @@ static bool allow_file_dedupe(struct file *file)
return true;
if (file->f_mode & FMODE_WRITE)
return true;
- if (uid_eq(current_fsuid(), i_uid_into_mnt(mnt_userns, inode)))
+ if (vfsuid_eq_kuid(i_uid_into_vfsuid(mnt_userns, inode), current_fsuid()))
return true;
if (!inode_permission(mnt_userns, inode, MAY_WRITE))
return true;