mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue