From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: check/original: Remove unused variable first_key
Date: Thu, 22 Mar 2018 17:06:24 +0800 [thread overview]
Message-ID: <20180322090624.13408-1-wqu@suse.com> (raw)
This @first_key variable is introduced in f5c4c4f3b75b
("btrfsck: add code to rebuild extent records"), however it's not only
unused, but also used incorrectly.
It's calling btrfs_item_key_to_cpu() on an node extent buffer.
Anyway, just remove it.
Fixes: f5c4c4f3b75b ("btrfsck: add code to rebuild extent records")
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
check/main.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/check/main.c b/check/main.c
index b476e07ba9e7..891a6d797756 100644
--- a/check/main.c
+++ b/check/main.c
@@ -6103,12 +6103,7 @@ static int run_next_block(struct btrfs_root *root,
}
} else {
int level;
- struct btrfs_key first_key;
- first_key.objectid = 0;
-
- if (nritems > 0)
- btrfs_item_key_to_cpu(buf, &first_key, 0);
level = btrfs_header_level(buf);
for (i = 0; i < nritems; i++) {
struct extent_record tmpl;
--
2.16.2
next reply other threads:[~2018-03-22 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 9:06 Qu Wenruo [this message]
2018-03-26 13:24 ` [PATCH] btrfs-progs: check/original: Remove unused variable first_key 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=20180322090624.13408-1-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;
as well as URLs for NNTP newsgroup(s).