提交 c8389d4c 编写于 作者: L Lu Fengqi 提交者: David Sterba

btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit

Since commit 0b246afa ("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 707e8a07
("btrfs: use nodesize everywhere, kill leafsize").
Signed-off-by: NLu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 031f24da
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册