From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 3/5] btrfs: remove unnecessarily shadowed variables
Date: Mon, 17 Aug 2020 14:11:36 +0200 [thread overview]
Message-ID: <f90a594dd5d9bf67e2160209d9e0e4bbd76fdfea.1597666167.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1597666167.git.dsterba@suse.com>
In btrfs_orphan_cleanup, there's another instance of fs_info, but it's
the same as the one we already have.
In btrfs_backref_finish_upper_links, rb_node is same type and used
as temporary cursor to the tree.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/backref.c | 1 -
fs/btrfs/inode.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index ea1c28ccb44f..b3268f4ea5f3 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -2997,7 +2997,6 @@ int btrfs_backref_finish_upper_links(struct btrfs_backref_cache *cache,
while (!list_empty(&pending_edge)) {
struct btrfs_backref_node *upper;
struct btrfs_backref_node *lower;
- struct rb_node *rb_node;
edge = list_first_entry(&pending_edge,
struct btrfs_backref_edge, list[UPPER]);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index dd84c4d58a56..ced88a830253 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3055,7 +3055,6 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
if (ret == -ENOENT && root == fs_info->tree_root) {
struct btrfs_root *dead_root;
- struct btrfs_fs_info *fs_info = root->fs_info;
int is_dead_root = 0;
/*
--
2.25.0
next prev parent reply other threads:[~2020-08-17 12:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 12:11 [PATCH 0/5] Misc warning fixes David Sterba
2020-08-17 12:11 ` [PATCH 1/5] btrfs: remove const from btrfs_feature_set_name David Sterba
2020-08-17 12:11 ` [PATCH 2/5] btrfs: compression: move declarations to header David Sterba
2020-08-17 12:11 ` David Sterba [this message]
2020-08-17 12:11 ` [PATCH 4/5] btrfs: scrub: rename ratelimit state varaible to avoid shadowing David Sterba
2020-08-17 12:11 ` [PATCH 5/5] btrfs: send: remove indirect callback parameter for changed_cb David Sterba
2020-08-18 15:38 ` [PATCH 0/5] Misc warning fixes Josef Bacik
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=f90a594dd5d9bf67e2160209d9e0e4bbd76fdfea.1597666167.git.dsterba@suse.com \
--to=dsterba@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