bcachefs: Fix unmount path
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 8 Sep 2020 22:30:32 +0000 (18:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:44 +0000 (17:08 -0400)
commitd5e4dcc29cce41b4bb51bf83c54940018d57e598
tree7d2fb3fcb3bac1f107f84208c1e33dec286d5a9c
parent625104ea21386361b60d20ae696b9df6111236f5
bcachefs: Fix unmount path

There was a long standing race in the mount/unmount code - the VFS
intends for mount/unmount synchronizatino to be handled by the list of
superblocks, but we were still holding devices open after tearing down
our superblock in the unmount path.

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