summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2026-06-30 02:09:17 +0200
committerDavid Sterba <dsterba@suse.com>2026-08-07 19:17:17 +0200
commit77038da5a975b01dc8447a01d5d8dd07445ef02c (patch)
tree5a94823069b28f80c55d86f46b64e241f41732b9
parent6de9a91f873c72dfeac153ba6084b1c88e15997c (diff)
btrfs: sink idmap parameter to __btrfs_ioctl_snap_create()
The 'idmap' parameter is derived from 'file' that we also pass to __btrfs_ioctl_snap_create(), assign it inside the function. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/ioctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a841d5f2830d..5cb927c6e53d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1143,13 +1143,13 @@ out_drop:
}
static noinline int __btrfs_ioctl_snap_create(struct file *file,
- struct mnt_idmap *idmap,
const char *name, unsigned long fd, bool subvol,
bool readonly,
struct btrfs_qgroup_inherit *inherit)
{
int ret;
struct qstr qname = QSTR(name);
+ struct mnt_idmap *idmap = file_mnt_idmap(file);
if (!S_ISDIR(file_inode(file)->i_mode))
return -ENOTDIR;
@@ -1227,8 +1227,7 @@ static noinline int btrfs_ioctl_snap_create(struct file *file,
if (ret < 0)
return ret;
- return __btrfs_ioctl_snap_create(file, file_mnt_idmap(file),
- vol_args->name, vol_args->fd, subvol,
+ return __btrfs_ioctl_snap_create(file, vol_args->name, vol_args->fd, subvol,
false, NULL);
}
@@ -1271,8 +1270,7 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,
return ret;
}
- return __btrfs_ioctl_snap_create(file, file_mnt_idmap(file),
- vol_args->name, vol_args->fd, subvol,
+ return __btrfs_ioctl_snap_create(file, vol_args->name, vol_args->fd, subvol,
readonly, inherit);
}