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 378061712c7684cf1f0e8043093cf7cf2b80eda9..e5bc09870c577b43298ba01f993903aa150d850f 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 dbf3b084478f66b720d41f821f852a4aef46fea1..a8d5c06541d0338a6581db7d3671df44be22280a 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 1dc21b5948eaffe42f9e0801838b73c7bf4cf12c..06704299640d11a8840dd648a197407866b103b4 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 49e475c15451d0dd0857b11a95f64233dc6c828a..6b793c9e95f434f93fdf9ca3abd12d2140d71777 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);