mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
xfs: Block writes to log device
Ask block layer to not allow other writers to open block devices used for xfs log and realtime devices. Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20231101174325.10596-6-jack@suse.cz Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
6f86176546
commit
3584c8f48a
|
|
@ -366,8 +366,9 @@ xfs_blkdev_get(
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
*handlep = bdev_open_by_path(name, BLK_OPEN_READ | BLK_OPEN_WRITE,
|
||||
mp->m_super, &fs_holder_ops);
|
||||
*handlep = bdev_open_by_path(name,
|
||||
BLK_OPEN_READ | BLK_OPEN_WRITE | BLK_OPEN_RESTRICT_WRITES,
|
||||
mp->m_super, &fs_holder_ops);
|
||||
if (IS_ERR(*handlep)) {
|
||||
error = PTR_ERR(*handlep);
|
||||
*handlep = NULL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user