Commit a7ecd30c authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Factor out two_state_shared_lock



We have a unique lock used for controlling adding to the pagecache: the
lock has two states, where both states are shared - the lock may be held
multiple times for either state - but not both states at the same time.

This is exactly what we need for nocow mode locking, so this patch pulls
it out of fs.c into its own file.

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