memstick/mspro_block: fix handling of read-only devices
Use set_disk_ro to propagate the read-only state to the block layer instead of checking for it in ->open and leaking a reference in case of a read-only device. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220215094514.3828912-4-hch@lst.deSigned-off-by: Jens Axboe <axboe@kernel.dk>
Showing
Please register or sign in to comment