From: Dan Carpenter Date: Fri, 15 Sep 2023 12:56:37 +0000 (+0300) Subject: bcachefs: snapshot: Add missing assignment in bch2_delete_dead_snapshots() X-Git-Tag: v6.7-rc1~201^2~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d67a72bfc92b0c0dab9c134964090c4700892e67;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c index ff7f71576d5c4..0acfca00a6af9 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");