diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-12 01:15:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-02 19:50:29 -0400 |
commit | 01e198f01d55880b79d8f5ac73064ff30a89d98a (patch) | |
tree | 5ba9d3b7f62832b90d82a3c2f7b54d222ee6f6e6 /block | |
parent | 1116b9fa15c09748ae05d2365a305fa22671eb1e (diff) |
bdev: move ->bd_read_only to ->__bd_flags
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block')
-rw-r--r-- | block/ioctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index 0c76137adcaa..be173e4ff43d 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -402,7 +402,10 @@ static int blkdev_roset(struct block_device *bdev, unsigned cmd, if (ret) return ret; } - bdev->bd_read_only = n; + if (n) + bdev_set_flag(bdev, BD_READ_ONLY); + else + bdev_clear_flag(bdev, BD_READ_ONLY); return 0; } |