mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
fs: Block writes to mounted block devices
Ask block layer to block writes to block devices mounted by filesystems. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20231101174325.10596-5-jack@suse.cz Reviewed-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
ead622674d
commit
6f86176546
|
|
@ -1494,7 +1494,8 @@ extern const struct blk_holder_ops fs_holder_ops;
|
|||
* as stored in sb->s_flags.
|
||||
*/
|
||||
#define sb_open_mode(flags) \
|
||||
(BLK_OPEN_READ | (((flags) & SB_RDONLY) ? 0 : BLK_OPEN_WRITE))
|
||||
(BLK_OPEN_READ | BLK_OPEN_RESTRICT_WRITES | \
|
||||
(((flags) & SB_RDONLY) ? 0 : BLK_OPEN_WRITE))
|
||||
|
||||
struct bdev_handle {
|
||||
struct block_device *bdev;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user