Commit 6dab421
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.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent e2efa07 commit 6dab421
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
| |||
1239 | 1234 | | |
1240 | 1235 | | |
1241 | 1236 | | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1242 | 1240 | | |
1243 | 1241 | | |
1244 | 1242 | | |
| |||
0 commit comments