All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit
@ 2018-07-17  8:58 Lu Fengqi
  2018-07-17 15:15 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Lu Fengqi @ 2018-07-17  8:58 UTC (permalink / raw)
  To: linux-btrfs

Since commit 0b246afa62b0 ("btrfs: root->fs_info cleanup, add fs_info
convenience variables"), the srcroot is no longer used to get fs_fino.
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>
---
 fs/btrfs/qgroup.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 52e05f031ee3..06e0e9b39340 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -2286,22 +2286,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
 	 */
@@ -2358,6 +2342,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;
-- 
2.18.0




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit
  2018-07-17  8:58 [PATCH] btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit Lu Fengqi
@ 2018-07-17 15:15 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2018-07-17 15:15 UTC (permalink / raw)
  To: Lu Fengqi; +Cc: linux-btrfs

On Tue, Jul 17, 2018 at 04:58:22PM +0800, Lu Fengqi wrote:
> Since commit 0b246afa62b0 ("btrfs: root->fs_info cleanup, add fs_info
> convenience variables"), the srcroot is no longer used to get fs_fino.
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-17 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17  8:58 [PATCH] btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit Lu Fengqi
2018-07-17 15:15 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.