projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initramfs: break loop when decompression finishes
[platform/kernel/linux-rpi.git]
/
block
/
blk-core.c
diff --git
a/block/blk-core.c
b/block/blk-core.c
index
9d51e98
..
2eca76c
100644
(file)
--- a/
block/blk-core.c
+++ b/
block/blk-core.c
@@
-501,9
+501,17
@@
static inline void bio_check_ro(struct bio *bio)
if (op_is_write(bio_op(bio)) && bdev_read_only(bio->bi_bdev)) {
if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))
return;
if (op_is_write(bio_op(bio)) && bdev_read_only(bio->bi_bdev)) {
if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))
return;
+
+ if (bio->bi_bdev->bd_ro_warned)
+ return;
+
+ bio->bi_bdev->bd_ro_warned = true;
+ /*
+ * Use ioctl to set underlying disk of raid/dm to read-only
+ * will trigger this.
+ */
pr_warn("Trying to write to read-only block-device %pg\n",
bio->bi_bdev);
pr_warn("Trying to write to read-only block-device %pg\n",
bio->bi_bdev);
- /* Older lvm-tools actually trigger this */
}
}
}
}