diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-23 00:54:23 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:06:59 +0100 |
commit | 0b246afa62b0cf5b09d078121f543135f28492ad (patch) | |
tree | 200ad296d09f1b2f5329658c8de81bc625007ace /fs/btrfs/send.c | |
parent | btrfs: root->fs_info cleanup, update_block_group{,flags} (diff) | |
download | linux-0b246afa62b0cf5b09d078121f543135f28492ad.tar.xz linux-0b246afa62b0cf5b09d078121f543135f28492ad.zip |
btrfs: root->fs_info cleanup, add fs_info convenience variables
In routines where someptr->fs_info is referenced multiple times, we
introduce a convenience variable. This makes the code considerably
more readable.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r-- | fs/btrfs/send.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 78845cc81dd6..399b36b2a182 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -1431,9 +1431,9 @@ static int find_extent_clone(struct send_ctx *sctx, extent_item_pos = logical - found_key.objectid; else extent_item_pos = 0; - ret = iterate_extent_inodes(fs_info, - found_key.objectid, extent_item_pos, 1, - __iterate_backrefs, backref_ctx); + ret = iterate_extent_inodes(fs_info, found_key.objectid, + extent_item_pos, 1, __iterate_backrefs, + backref_ctx); if (ret < 0) goto out; @@ -6137,17 +6137,17 @@ static void btrfs_root_dec_send_in_progress(struct btrfs_root* root) */ if (root->send_in_progress < 0) btrfs_err(root->fs_info, - "send_in_progres unbalanced %d root %llu", - root->send_in_progress, root->root_key.objectid); + "send_in_progres unbalanced %d root %llu", + root->send_in_progress, root->root_key.objectid); spin_unlock(&root->root_item_lock); } long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_) { int ret = 0; - struct btrfs_root *send_root; + struct btrfs_root *send_root = BTRFS_I(file_inode(mnt_file))->root; + struct btrfs_fs_info *fs_info = send_root->fs_info; struct btrfs_root *clone_root; - struct btrfs_fs_info *fs_info; struct btrfs_ioctl_send_args *arg = NULL; struct btrfs_key key; struct send_ctx *sctx = NULL; @@ -6161,9 +6161,6 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_) if (!capable(CAP_SYS_ADMIN)) return -EPERM; - send_root = BTRFS_I(file_inode(mnt_file))->root; - fs_info = send_root->fs_info; - /* * The subvolume must remain read-only during send, protect against * making it RW. This also protects against deletion. |