mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
ext4: Block writes to journal device
Ask block layer to not allow other writers to open block device used for ext4 journal. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20231101174325.10596-7-jack@suse.cz Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
3584c8f48a
commit
afde134b5b
1 changed files with 3 additions and 2 deletions
|
@ -5864,8 +5864,9 @@ static struct bdev_handle *ext4_get_journal_blkdev(struct super_block *sb,
|
|||
struct ext4_super_block *es;
|
||||
int errno;
|
||||
|
||||
bdev_handle = bdev_open_by_dev(j_dev, BLK_OPEN_READ | BLK_OPEN_WRITE,
|
||||
sb, &fs_holder_ops);
|
||||
bdev_handle = bdev_open_by_dev(j_dev,
|
||||
BLK_OPEN_READ | BLK_OPEN_WRITE | BLK_OPEN_RESTRICT_WRITES,
|
||||
sb, &fs_holder_ops);
|
||||
if (IS_ERR(bdev_handle)) {
|
||||
ext4_msg(sb, KERN_ERR,
|
||||
"failed to open journal device unknown-block(%u,%u) %ld",
|
||||
|
|
Loading…
Reference in a new issue