diff options
author | Jan Kara <[email protected]> | 2023-07-24 10:51:45 -0700 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2023-08-10 10:34:56 +0200 |
commit | aca740cecbe57b12bd9c1fc632092af5ebacda0c (patch) | |
tree | f428c673f3260b06ad92c897fe70bc81c4150a31 /net/lapb/lapb_subr.c | |
parent | a4f64a300a299f884a1da55d99c97a87061201cd (diff) |
fs: open block device after superblock creation
Currently get_tree_bdev and mount_bdev open the block device before
committing to allocating a super block. That creates problems for
restricting the number of writers to a device, and also leads to a
unusual and not very helpful holder (the fs_type).
Reorganize the super block code to first look whether the superblock for
a particular device does already exist and open the block device only if
it doesn't.
[hch: port to before the bdev_handle changes,
duplicate the bdev read-only check from blkdev_get_by_path,
extend the fsfree_mutex coverage to protect against freezes,
fix an open bdev leak when the bdev is frozen,
use the bdev local variable more,
rename the s variable to sb to be more descriptive]
[brauner: remove references to mounts as they're mostly irrelevant]
[brauner & hch: fold fixes for romfs and cramfs for
[email protected]]
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions