From 8e5b1115f1dd88125cbb06c344ba1f4214265042 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 11 Jun 2023 19:45:21 -0400 Subject: [PATCH] bcachefs: Write buffer flush needs BTREE_INSERT_NOCHECK_RW btree write buffer flush is only invoked from contexts that already hold a write ref, and checking if we're still RW could cause us to fail to completely flush the write buffer when shutting down. Signed-off-by: Kent Overstreet --- fs/bcachefs/btree_write_buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/bcachefs/btree_write_buffer.c b/fs/bcachefs/btree_write_buffer.c index 9983a47853b9..88c4b50dd70f 100644 --- a/fs/bcachefs/btree_write_buffer.c +++ b/fs/bcachefs/btree_write_buffer.c @@ -78,6 +78,7 @@ static int bch2_btree_write_buffer_flush_one(struct btree_trans *trans, return bch2_trans_update(trans, iter, &wb->k, 0) ?: bch2_trans_commit(trans, NULL, NULL, commit_flags| + BTREE_INSERT_NOCHECK_RW| BTREE_INSERT_NOFAIL| BTREE_INSERT_JOURNAL_RECLAIM); }