Message ID | 4D5A98C7.3070803@redhat.com (mailing list archive) |
---|---|
State | Deferred, archived |
Delegated to: | Alasdair Kergon |
Headers | show |
diff --git a/fs/block_dev.c b/fs/block_dev.c index c9cf9f7..db2c8db 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1219,7 +1219,7 @@ int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder) /* __blkdev_get() may alter read only status, check it afterwards */ if (!res && (mode & FMODE_WRITE) && bdev_read_only(bdev)) { __blkdev_put(bdev, mode, 0); - res = -EACCES; + res = -EROFS; } if (whole) {