summaryrefslogtreecommitdiff
path: root/fs/bcachefs/snapshot.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-09-15 15:56:37 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:14 +0300
commitd67a72bfc92b0c0dab9c134964090c4700892e67 (patch)
tree258005cb0e9740aedb4c4d6eb7d4a18f4d29a288 /fs/bcachefs/snapshot.c
parent1f12900ab52304a7c41714b6ad86990eb428fbc9 (diff)
downloadlinux-d67a72bfc92b0c0dab9c134964090c4700892e67.tar.xz
bcachefs: snapshot: Add missing assignment in bch2_delete_dead_snapshots()
This code accidentally left out the "ret = " assignment so the errors from for_each_btree_key2() are not checked. Fixes: 53534482a250 ("bcachefs: for_each_btree_key2()") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/snapshot.c')
-rw-r--r--fs/bcachefs/snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
index ff7f71576d5c..0acfca00a6af 100644
--- a/fs/bcachefs/snapshot.c
+++ b/fs/bcachefs/snapshot.c
@@ -1405,8 +1405,8 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
goto err;
}
- for_each_btree_key2(trans, iter, BTREE_ID_snapshots,
- POS_MIN, 0, k,
+ ret = for_each_btree_key2(trans, iter, BTREE_ID_snapshots,
+ POS_MIN, 0, k,
bch2_snapshot_set_equiv(trans, k));
if (ret) {
bch_err_msg(c, ret, "in bch2_snapshots_set_equiv");