Commit 5d54c67e authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove transid argument from btrfs_ioctl_snap_create_transid

btrfs_ioctl_snap_create_transid no longer takes a transid argument, so
remove it and rename the function to __btrfs_ioctl_snap_create to
reflect it's an internal, worker function.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9c1036fd
...@@ -1729,9 +1729,9 @@ static noinline int btrfs_ioctl_resize(struct file *file, ...@@ -1729,9 +1729,9 @@ static noinline int btrfs_ioctl_resize(struct file *file,
return ret; return ret;
} }
static noinline int btrfs_ioctl_snap_create_transid(struct file *file, static noinline int __btrfs_ioctl_snap_create(struct file *file,
const char *name, unsigned long fd, int subvol, const char *name, unsigned long fd, int subvol,
u64 *transid, bool readonly, bool readonly,
struct btrfs_qgroup_inherit *inherit) struct btrfs_qgroup_inherit *inherit)
{ {
int namelen; int namelen;
...@@ -1758,7 +1758,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, ...@@ -1758,7 +1758,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
if (subvol) { if (subvol) {
ret = btrfs_mksubvol(&file->f_path, name, namelen, ret = btrfs_mksubvol(&file->f_path, name, namelen,
NULL, transid, readonly, inherit); NULL, readonly, inherit);
} else { } else {
struct fd src = fdget(fd); struct fd src = fdget(fd);
struct inode *src_inode; struct inode *src_inode;
...@@ -1781,7 +1781,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, ...@@ -1781,7 +1781,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
} else { } else {
ret = btrfs_mksubvol(&file->f_path, name, namelen, ret = btrfs_mksubvol(&file->f_path, name, namelen,
BTRFS_I(src_inode)->root, BTRFS_I(src_inode)->root,
transid, readonly, inherit); readonly, inherit);
} }
fdput(src); fdput(src);
} }
...@@ -1805,9 +1805,8 @@ static noinline int btrfs_ioctl_snap_create(struct file *file, ...@@ -1805,9 +1805,8 @@ static noinline int btrfs_ioctl_snap_create(struct file *file,
return PTR_ERR(vol_args); return PTR_ERR(vol_args);
vol_args->name[BTRFS_PATH_NAME_MAX] = '\0'; vol_args->name[BTRFS_PATH_NAME_MAX] = '\0';
ret = btrfs_ioctl_snap_create_transid(file, vol_args->name, ret = __btrfs_ioctl_snap_create(file, vol_args->name, vol_args->fd,
vol_args->fd, subvol, subvol, false, NULL);
NULL, false, NULL);
kfree(vol_args); kfree(vol_args);
return ret; return ret;
...@@ -1848,9 +1847,8 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file, ...@@ -1848,9 +1847,8 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,
} }
} }
ret = btrfs_ioctl_snap_create_transid(file, vol_args->name, ret = __btrfs_ioctl_snap_create(file, vol_args->name, vol_args->fd,
vol_args->fd, subvol, NULL, subvol, readonly, inherit);
readonly, inherit);
if (ret) if (ret)
goto free_inherit; goto free_inherit;
free_inherit: free_inherit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment