]> Git Repo - linux.git/commit - fs/super.c
fs,block: yield devices early
authorChristian Brauner <[email protected]>
Tue, 26 Mar 2024 12:47:22 +0000 (13:47 +0100)
committerChristian Brauner <[email protected]>
Wed, 27 Mar 2024 12:17:15 +0000 (13:17 +0100)
commit22650a99821dda3d05f1c334ea90330b4982de56
treed6dbade087df53eb660d654d876a35c6d1a59a54
parent3ff56e285de5a375fbfab3c3f1af81bbd23db36d
fs,block: yield devices early

Currently a device is only really released once the umount returns to
userspace due to how file closing works. That ultimately could cause
an old umount assumption to be violated that concurrent umount and mount
don't fail. So an exclusively held device with a temporary holder should
be yielded before the filesystem is gone. Add a helper that allows
callers to do that. This also allows us to remove the two holder ops
that Linus wasn't excited about.

Link: https://lore.kernel.org/r/[email protected]
Fixes: f3a608827d1f ("bdev: open block device as files") # mainline only
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
13 files changed:
block/bdev.c
drivers/mtd/devices/block2mtd.c
fs/bcachefs/super-io.c
fs/cramfs/inode.c
fs/ext4/super.c
fs/f2fs/super.c
fs/jfs/jfs_logmgr.c
fs/reiserfs/journal.c
fs/romfs/super.c
fs/super.c
fs/xfs/xfs_buf.c
fs/xfs/xfs_super.c
include/linux/blkdev.h
This page took 0.07498 seconds and 4 git commands to generate.