summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-12 02:45:21 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:04 +0300
commit8e5b1115f1dd88125cbb06c344ba1f4214265042 (patch)
tree1f90df01f27cebabc17c7f055130c4eb1c43ecf4 /fs
parent7724664f0ee4520f1c7fd3c0cc26223ba532986f (diff)
downloadlinux-8e5b1115f1dd88125cbb06c344ba1f4214265042.tar.xz
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/btree_write_buffer.c1
1 files changed, 1 insertions, 0 deletions
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 @@ trans_commit:
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);
}