diff --git a/fs/bcachefs/lru.c b/fs/bcachefs/lru.c index ce23b38382f5..d278331776dd 100644 --- a/fs/bcachefs/lru.c +++ b/fs/bcachefs/lru.c @@ -130,7 +130,7 @@ int bch2_lru_change(struct btree_trans *trans, u64 id, u64 idx, } static int bch2_check_lru_key(struct btree_trans *trans, - struct btree_iter *lru_iter, bool initial) + struct btree_iter *lru_iter) { struct bch_fs *c = trans->c; struct btree_iter iter; @@ -193,7 +193,7 @@ fsck_err: return ret; } -int bch2_check_lrus(struct bch_fs *c, bool initial) +int bch2_check_lrus(struct bch_fs *c) { struct btree_trans trans; struct btree_iter iter; @@ -207,7 +207,7 @@ int bch2_check_lrus(struct bch_fs *c, bool initial) ret = __bch2_trans_do(&trans, NULL, NULL, BTREE_INSERT_NOFAIL| BTREE_INSERT_LAZY_RW, - bch2_check_lru_key(&trans, &iter, initial)); + bch2_check_lru_key(&trans, &iter)); if (ret) break; } diff --git a/fs/bcachefs/lru.h b/fs/bcachefs/lru.h index bfe38a67e585..3decb7b1dde2 100644 --- a/fs/bcachefs/lru.h +++ b/fs/bcachefs/lru.h @@ -14,6 +14,6 @@ int bch2_lru_delete(struct btree_trans *, u64, u64, u64, struct bkey_s_c); int bch2_lru_set(struct btree_trans *, u64, u64, u64 *); int bch2_lru_change(struct btree_trans *, u64, u64, u64, u64 *, struct bkey_s_c); -int bch2_check_lrus(struct bch_fs *, bool); +int bch2_check_lrus(struct bch_fs *); #endif /* _BCACHEFS_LRU_H */ diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index f54859b49416..87a4bced853a 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -1256,24 +1256,19 @@ use_clean: bch_info(c, "checking lrus"); err = "error checking lrus"; - ret = bch2_check_lrus(c, true); + ret = bch2_check_lrus(c); if (ret) goto err; bch_verbose(c, "done checking lrus"); - set_bit(BCH_FS_CHECK_LRUS_DONE, &c->flags); bch_info(c, "checking alloc to lru refs"); err = "error checking alloc to lru refs"; ret = bch2_check_alloc_to_lru_refs(c); - if (ret) - goto err; - set_bit(BCH_FS_CHECK_ALLOC_TO_LRU_REFS_DONE, &c->flags); - - ret = bch2_check_lrus(c, true); if (ret) goto err; bch_verbose(c, "done checking alloc to lru refs"); + set_bit(BCH_FS_CHECK_ALLOC_TO_LRU_REFS_DONE, &c->flags); } else { set_bit(BCH_FS_MAY_GO_RW, &c->flags); set_bit(BCH_FS_INITIAL_GC_DONE, &c->flags);