bcachefs: Kill verify_not_stale()
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 14 Feb 2022 09:20:39 +0000 (04:20 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
This is ancient code that's more effectively checked in other places
now.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/alloc_foreground.c

index e2038032b872ade890296cbb343be0161dd0f3bb..dc2f153f60c6fec4054aed32173962afd118274f 100644 (file)
@@ -151,22 +151,6 @@ static void open_bucket_free_unused(struct bch_fs *c,
        }
 }
 
-static void verify_not_stale(struct bch_fs *c, const struct open_buckets *obs)
-{
-#ifdef CONFIG_BCACHEFS_DEBUG
-       struct open_bucket *ob;
-       unsigned i;
-
-       rcu_read_lock();
-       open_bucket_for_each(c, obs, ob, i) {
-               struct bch_dev *ca = bch_dev_bkey_exists(c, ob->dev);
-
-               BUG_ON(*bucket_gen(ca, ob->bucket) != ob->gen);
-       }
-       rcu_read_unlock();
-#endif
-}
-
 /* _only_ for allocating the journal on a new device: */
 long bch2_bucket_alloc_new_fs(struct bch_dev *ca)
 {
@@ -857,8 +841,6 @@ alloc_done:
 
        BUG_ON(!wp->sectors_free || wp->sectors_free == UINT_MAX);
 
-       verify_not_stale(c, &wp->ptrs);
-
        return wp;
 err:
        open_bucket_for_each(c, &wp->ptrs, ob, i)