diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-10 17:03:59 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 07:54:22 -0400 |
commit | bd6c57dda666868abb222c1fa48e72f81db20e70 (patch) | |
tree | bbdbbc50e46a2f9562ca647434d2112d6481717e | |
parent | f5ee5c9ac56cd328fcc915582f81226affebd81c (diff) |
btrfs: simpilify btrfs_subvol_inherit_props
We just need a superblock, but we look it up using two different
roots depending on the call site. Let's just use a superblock
pointer initialized at the outset.
This is mostly for Coccinelle not to choke on my root push up set.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/props.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c index 36992128c746..cf0b444ac4f3 100644 --- a/fs/btrfs/props.c +++ b/fs/btrfs/props.c | |||
@@ -350,6 +350,7 @@ int btrfs_subvol_inherit_props(struct btrfs_trans_handle *trans, | |||
350 | struct btrfs_root *root, | 350 | struct btrfs_root *root, |
351 | struct btrfs_root *parent_root) | 351 | struct btrfs_root *parent_root) |
352 | { | 352 | { |
353 | struct super_block *sb = root->fs_info->sb; | ||
353 | struct btrfs_key key; | 354 | struct btrfs_key key; |
354 | struct inode *parent_inode, *child_inode; | 355 | struct inode *parent_inode, *child_inode; |
355 | int ret; | 356 | int ret; |
@@ -358,12 +359,11 @@ int btrfs_subvol_inherit_props(struct btrfs_trans_handle *trans, | |||
358 | key.type = BTRFS_INODE_ITEM_KEY; | 359 | key.type = BTRFS_INODE_ITEM_KEY; |
359 | key.offset = 0; | 360 | key.offset = 0; |
360 | 361 | ||
361 | parent_inode = btrfs_iget(parent_root->fs_info->sb, &key, | 362 | parent_inode = btrfs_iget(sb, &key, parent_root, NULL); |
362 | parent_root, NULL); | ||
363 | if (IS_ERR(parent_inode)) | 363 | if (IS_ERR(parent_inode)) |
364 | return PTR_ERR(parent_inode); | 364 | return PTR_ERR(parent_inode); |
365 | 365 | ||
366 | child_inode = btrfs_iget(root->fs_info->sb, &key, root, NULL); | 366 | child_inode = btrfs_iget(sb, &key, root, NULL); |
367 | if (IS_ERR(child_inode)) { | 367 | if (IS_ERR(child_inode)) { |
368 | iput(parent_inode); | 368 | iput(parent_inode); |
369 | return PTR_ERR(child_inode); | 369 | return PTR_ERR(child_inode); |