Commit 6214485b authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: BTREE_INSERT_LAZY_RW is only for recovery path

BTREE_INSERT_LAZY_RW shouldn't do anything after the filesystem has
finished starting up - otherwise, it might interfere with going
read-only as part of shutting down.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 8ede9910
......@@ -841,7 +841,8 @@ bch2_trans_commit_get_rw_cold(struct btree_trans *trans)
struct bch_fs *c = trans->c;
int ret;
if (likely(!(trans->flags & BTREE_INSERT_LAZY_RW)))
if (likely(!(trans->flags & BTREE_INSERT_LAZY_RW)) ||
test_bit(BCH_FS_STARTED, &c->flags))
return -EROFS;
bch2_trans_unlock(trans);
......
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