bcachefs: seqmutex; fix a lockdep splat
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 20 Jun 2023 01:01:13 +0000 (21:01 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:04 +0000 (17:10 -0400)
commita5b696ee6e10103def82ea9abc18958912e81b00
treec8b0dadf44dd7441a92c2081b7b78202386bd3bc
parent6547ebabdaac4407ccc978f63f4dc4d9f8936783
bcachefs: seqmutex; fix a lockdep splat

We can't be holding btree_trans_lock while copying to user space, which
might incur a page fault. To fix this, convert it to a seqmutex so we
can unlock/relock.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_iter.c
fs/bcachefs/debug.c
fs/bcachefs/seqmutex.h [new file with mode: 0644]
fs/bcachefs/sysfs.c