summaryrefslogtreecommitdiff
path: root/block/ioctl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-04-12 01:15:55 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2024-05-02 19:50:29 -0400
commit01e198f01d55880b79d8f5ac73064ff30a89d98a (patch)
tree5ba9d3b7f62832b90d82a3c2f7b54d222ee6f6e6 /block/ioctl.c
parent1116b9fa15c09748ae05d2365a305fa22671eb1e (diff)
bdev: move ->bd_read_only to ->__bd_flags
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/ioctl.c')
-rw-r--r--block/ioctl.c5
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;
}