From: Kent Overstreet Date: Thu, 24 Apr 2025 13:13:28 +0000 (-0400) Subject: bcachefs: Remove redundant calls to btree_lost_data() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3aecbb01a168bf6396955e5da0533f6e5f000441;p=users%2Fwilly%2Flinux.git bcachefs: Remove redundant calls to btree_lost_data() The btree node read path calls this before returning the read error. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index fecf88079127..92ae31737a24 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -378,10 +378,6 @@ again: b->c.level, cur_k.k->k.p); if (ret) break; - - ret = bch2_btree_lost_data(c, b->c.btree_id); - if (ret) - break; continue; } @@ -543,9 +539,6 @@ int bch2_check_topology(struct bch_fs *c) bch2_btree_id_to_text(&buf, i); if (r->error) { - ret = bch2_btree_lost_data(c, i); - if (ret) - break; reconstruct_root: bch_info(c, "btree root %s unreadable, must recover from scan", buf.buf); diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 8f45d9e3a47e..a0b42cca86fb 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -587,9 +587,6 @@ static int read_btree_roots(struct bch_fs *c) buf.buf, bch2_err_str(ret))) { if (btree_id_is_alloc(i)) r->error = 0; - - ret = bch2_btree_lost_data(c, i); - BUG_ON(ret); } }