diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2018-07-17 16:58:22 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 13:12:49 +0200 |
commit | c8389d4c0d6eb7c0b7f8b8a98620874f9123cd20 (patch) | |
tree | 841d5d263af5e00c9ea4f5db56d62591dbcb763e /fs/btrfs/qgroup.c | |
parent | 031f24da2c8a7b611331c368d7bfabccafda09fa (diff) | |
download | op-kernel-dev-c8389d4c0d6eb7c0b7f8b8a98620874f9123cd20.zip op-kernel-dev-c8389d4c0d6eb7c0b7f8b8a98620874f9123cd20.tar.gz |
btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit
Since commit 0b246afa62b0 ("btrfs: root->fs_info cleanup, add fs_info
convenience variables"), the srcroot is no longer used to get
fs_info::nodesize. In fact, it can be dropped after commit 707e8a071528
("btrfs: use nodesize everywhere, kill leafsize").
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r-- | fs/btrfs/qgroup.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 97a59a4..e0bd48c 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -2287,22 +2287,6 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, if (ret) goto out; - if (srcid) { - struct btrfs_root *srcroot; - struct btrfs_key srckey; - - srckey.objectid = srcid; - srckey.type = BTRFS_ROOT_ITEM_KEY; - srckey.offset = (u64)-1; - srcroot = btrfs_read_fs_root_no_name(fs_info, &srckey); - if (IS_ERR(srcroot)) { - ret = PTR_ERR(srcroot); - goto out; - } - - level_size = fs_info->nodesize; - } - /* * add qgroup to all inherited groups */ @@ -2359,6 +2343,7 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, * our counts don't go crazy, so at this point the only * difference between the two roots should be the root node. */ + level_size = fs_info->nodesize; dstgroup->rfer = srcgroup->rfer; dstgroup->rfer_cmpr = srcgroup->rfer_cmpr; dstgroup->excl = level_size; |