bcachefs: Fix lock ordering with snapshot_create_lock
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 19 Oct 2023 19:23:56 +0000 (15:23 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 31 Oct 2023 16:18:11 +0000 (12:18 -0400)
commit0dd092bf1091a114f22136e5776aec21e6e4af2a
tree7ee7fa78f9a323b46723d353f114634cd6e436a4
parent20e425d301d673dbd5df0c9d4b186c70b43813bb
bcachefs: Fix lock ordering with snapshot_create_lock

We must not hold btree locks while taking snapshot_create_lock - this
fixes a lockdep splat.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/snapshot.c