aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2022-03-09 17:31:39 -0800
committerDavid Sterba <dsterba@suse.com>2022-05-16 17:03:06 +0200
commit70dc55f428dd3bf10421ec65f9a30aef01ea5007 (patch)
tree55eebb1a1c37270c0144cefb65a655f75428c3ad /fs/btrfs/ioctl.c
parentbtrfs: remove unused mnt_userns parameter from __btrfs_set_acl (diff)
downloadlinux-dev-70dc55f428dd3bf10421ec65f9a30aef01ea5007.tar.xz
linux-dev-70dc55f428dd3bf10421ec65f9a30aef01ea5007.zip
btrfs: remove redundant name and name_len parameters to create_subvol
The passed dentry already contains the name. Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me> Signed-off-by: Omar Sandoval <osandov@fb.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 777801902511..4a015579a46e 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -546,9 +546,10 @@ int __pure btrfs_is_empty_uuid(u8 *uuid)
static noinline int create_subvol(struct user_namespace *mnt_userns,
struct inode *dir, struct dentry *dentry,
- const char *name, int namelen,
struct btrfs_qgroup_inherit *inherit)
{
+ const char *name = dentry->d_name.name;
+ int namelen = dentry->d_name.len;
struct btrfs_fs_info *fs_info = btrfs_sb(dir->i_sb);
struct btrfs_trans_handle *trans;
struct btrfs_key key;
@@ -980,7 +981,7 @@ static noinline int btrfs_mksubvol(const struct path *parent,
if (snap_src)
error = create_snapshot(snap_src, dir, dentry, readonly, inherit);
else
- error = create_subvol(mnt_userns, dir, dentry, name, namelen, inherit);
+ error = create_subvol(mnt_userns, dir, dentry, inherit);
if (!error)
fsnotify_mkdir(dir, dentry);