block: add a new set_read_only method
authorChristoph Hellwig <hch@lst.de>
Tue, 3 Nov 2020 10:00:11 +0000 (11:00 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Nov 2020 15:14:29 +0000 (08:14 -0700)
commite00adcadf3af7a8335026d71ab9f0e0a922191ac
tree7d7f22326e387ef08b23cf9a3a76e6f16fc1b089
parent4a9d6d667f0bafed55a9e9f5ae8bceb3680749d7
block: add a new set_read_only method

Add a new method to allow for driver-specific processing when setting or
clearing the block device read-only state.  This allows to replace the
cumbersome and error-prone override of the whole ioctl implementation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioctl.c
include/linux/blkdev.h