Commit 55334d78 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Kill BCH_FS_HOLD_BTREE_WRITES

This was just dead code.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 2975cd47
......@@ -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 {
......
......@@ -223,8 +223,7 @@ static int __btree_node_reclaim(struct bch_fs *c, struct btree *b, bool flush)
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
......
......@@ -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
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment