Commit 183bcc89 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Clean up btree write buffer write ref handling



__bch2_btree_write_buffer_flush() now assumes a write ref is already
held (as called by the transaction commit path); and the wrappers
bch2_write_buffer_flush() and flush_sync() take an explicit write ref.

This means internally the write buffer code can always use
BTREE_INSERT_NOCHECK_RW, instead of in the previous code passing flags
around and hoping the NOCHECK_RW flag was always carried around
correctly.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent cf5bacb6
Supports Markdown
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