]> www.infradead.org Git - users/hch/block.git/commit
memstick/mspro_block: fix handling of read-only devices
authorChristoph Hellwig <hch@lst.de>
Fri, 28 Jan 2022 13:25:11 +0000 (14:25 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 15 Feb 2022 08:08:20 +0000 (09:08 +0100)
commitd1b6fb8f689fa13a2656ce9c6399be82326b56a4
tree30c064687585ade76b08f195cfbb160bfa1a8096
parente982531f0ade962719623fcceae056979791c915
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>
drivers/memstick/core/mspro_block.c