public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 2/2] btrfs-progs: remove the unused variable in check_chunks_and_extents_lowmem()
Date: Wed, 26 Aug 2020 08:47:34 +0800	[thread overview]
Message-ID: <20200826004734.89905-3-wqu@suse.com> (raw)
In-Reply-To: <20200826004734.89905-1-wqu@suse.com>

The variable @root is only set but not utilized, while we only utilize
@root1.

Replace @root1 with @root, then remove the @root1.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 check/mode-lowmem.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 3ce119fa0f61..837bacf920ac 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -5399,20 +5399,17 @@ int check_chunks_and_extents_lowmem(void)
 	struct btrfs_path path;
 	struct btrfs_key old_key;
 	struct btrfs_key key;
-	struct btrfs_root *root1;
 	struct btrfs_root *root;
 	struct btrfs_root *cur_root;
 	int err = 0;
 	int ret;
 
-	root = gfs_info->fs_root;
-
-	root1 = gfs_info->chunk_root;
-	ret = check_btrfs_root(root1, 1);
+	root = gfs_info->chunk_root;
+	ret = check_btrfs_root(root, 1);
 	err |= ret;
 
-	root1 = gfs_info->tree_root;
-	ret = check_btrfs_root(root1, 1);
+	root = gfs_info->tree_root;
+	ret = check_btrfs_root(root, 1);
 	err |= ret;
 
 	btrfs_init_path(&path);
@@ -5420,7 +5417,7 @@ int check_chunks_and_extents_lowmem(void)
 	key.offset = 0;
 	key.type = BTRFS_ROOT_ITEM_KEY;
 
-	ret = btrfs_search_slot(NULL, root1, &key, &path, 0, 0);
+	ret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
 	if (ret) {
 		error("cannot find extent tree in tree_root");
 		goto out;
@@ -5455,7 +5452,7 @@ int check_chunks_and_extents_lowmem(void)
 		if (ret)
 			goto out;
 next:
-		ret = btrfs_next_item(root1, &path);
+		ret = btrfs_next_item(root, &path);
 		if (ret)
 			goto out;
 	}
-- 
2.28.0


  parent reply	other threads:[~2020-08-26  0:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  0:47 [PATCH 0/2] btrfs-progs: small compile warning fixes Qu Wenruo
2020-08-26  0:47 ` [PATCH 1/2] btrfs-progs: fix compile warning due to global fs_info cleanup Qu Wenruo
2020-08-26 14:26   ` Josef Bacik
2020-08-28 16:06   ` David Sterba
2020-08-26  0:47 ` Qu Wenruo [this message]
2020-08-26 14:29   ` [PATCH 2/2] btrfs-progs: remove the unused variable in check_chunks_and_extents_lowmem() Josef Bacik
2020-08-28 16:06   ` David Sterba
2020-08-26 15:31 ` [PATCH 0/2] btrfs-progs: small compile warning fixes David Sterba
2020-08-26 15:43   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200826004734.89905-3-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox