aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_iter.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-11-11 16:02:15 -0500
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2024-01-01 11:47:37 -0500
commitcd5bd1628284f874ad6180be1f67e9b6739cc02a (patch)
tree1e5006bdb89f85b9ab494eb815a6b76949395031 /fs/bcachefs/btree_iter.c
parentbcachefs: Avoiding dropping/retaking write locks in bch2_btree_write_buffer_f... (diff)
downloadlinux-cd5bd1628284f874ad6180be1f67e9b6739cc02a.tar.gz
linux-cd5bd1628284f874ad6180be1f67e9b6739cc02a.tar.bz2
linux-cd5bd1628284f874ad6180be1f67e9b6739cc02a.zip
bcachefs: Fix redundant variable initialization
path->level was being read, but never used. Reported-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r--fs/bcachefs/btree_iter.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index da594e006769..bf4d2ade4535 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -1214,8 +1214,6 @@ __bch2_btree_path_set_pos(struct btree_trans *trans,
struct btree_path *path, struct bpos new_pos,
bool intent, unsigned long ip, int cmp)
{
- unsigned level = path->level;
-
bch2_trans_verify_not_in_restart(trans);
EBUG_ON(!path->ref);
@@ -1231,7 +1229,7 @@ __bch2_btree_path_set_pos(struct btree_trans *trans,
goto out;
}
- level = btree_path_up_until_good_node(trans, path, cmp);
+ unsigned level = btree_path_up_until_good_node(trans, path, cmp);
if (btree_path_node(path, level)) {
struct btree_path_level *l = &path->l[level];