[PATCH] block/swim: Return -EROFS for FMODE_WRITE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Write requests are not supported by the driver and result in IO errors:

print_req_error: I/O error, dev fd0, sector 0
buffer_io_error: 26 callbacks suppressed
Buffer I/O error on dev fd0, logical block 0, lost async page write
Buffer I/O error on dev fd0, logical block 1, lost async page write
Buffer I/O error on dev fd0, logical block 2, lost async page write
Buffer I/O error on dev fd0, logical block 3, lost async page write
Buffer I/O error on dev fd0, logical block 4, lost async page write
Buffer I/O error on dev fd0, logical block 5, lost async page write
Buffer I/O error on dev fd0, logical block 6, lost async page write
Buffer I/O error on dev fd0, logical block 7, lost async page write
Buffer I/O error on dev fd0, logical block 8, lost async page write
Buffer I/O error on dev fd0, logical block 9, lost async page write
print_req_error: I/O error, dev fd0, sector 2688
print_req_error: I/O error, dev fd0, sector 0

Cc: linux-m68k@xxxxxxxxxxxxxxxxxxxx
Tested-by: Stan Johnson <userm57@xxxxxxxxx>
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
---
 drivers/block/swim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 3fa6fcc34790..dd19f422fb0d 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -643,7 +643,7 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
 
 	if (mode & (FMODE_READ|FMODE_WRITE)) {
 		check_disk_change(bdev);
-		if ((mode & FMODE_WRITE) && fs->write_protected) {
+		if (mode & FMODE_WRITE) { /* not implemented */
 			err = -EROFS;
 			goto out;
 		}
-- 
2.19.2




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux