bcachefs: Kill BCH_FS_HOLD_BTREE_WRITES
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 27 Feb 2022 01:25:15 +0000 (20:25 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:25 +0000 (17:09 -0400)
This was just dead code.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_io.c
fs/bcachefs/btree_update_interior.c

index 3780617..e5bc098 100644 (file)
@@ -534,7 +534,6 @@ enum {
        BCH_FS_NEED_ANOTHER_GC,
        BCH_FS_DELETED_NODES,
        BCH_FS_REBUILD_REPLICAS,
-       BCH_FS_HOLD_BTREE_WRITES,
 };
 
 struct btree_debug {
index dbf3b08..a8d5c06 100644 (file)
@@ -223,8 +223,7 @@ wait_on_io:
                goto out_unlock;
 
        if (btree_node_dirty(b)) {
-               if (!flush ||
-                   test_bit(BCH_FS_HOLD_BTREE_WRITES, &c->flags))
+               if (!flush)
                        goto out_unlock;
                /*
                 * Using the underscore version because we don't want to compact
index 1dc21b5..0670429 100644 (file)
@@ -1772,9 +1772,6 @@ void __bch2_btree_node_write(struct bch_fs *c, struct btree *b, bool already_sta
        if (already_started)
                goto do_write;
 
-       if (test_bit(BCH_FS_HOLD_BTREE_WRITES, &c->flags))
-               return;
-
        /*
         * We may only have a read lock on the btree node - the dirty bit is our
         * "lock" against racing with other threads that may be trying to start
index 49e475c..6b793c9 100644 (file)
@@ -1104,8 +1104,7 @@ static void bch2_btree_set_root(struct btree_update *as,
        struct btree *old;
 
        trace_btree_set_root(c, b);
-       BUG_ON(!b->written &&
-              !test_bit(BCH_FS_HOLD_BTREE_WRITES, &c->flags));
+       BUG_ON(!b->written);
 
        old = btree_node_root(c, b);