Unverified Commit d2dbfe81 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3552 block: warn once for each partition in bio_check_ro()

Merge Pull Request from: @ci-robot 
 
PR sync from: Yu Kuai <yukuai3@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/KBAJO2PJQPS5CITY4R2HNBW3IBM22MYK/ 
Yu Kuai (2):
  block: warn once for each partition in bio_check_ro()
  block: fix kabi broken in struct hd_part


-- 
2.39.2
 
https://gitee.com/openeuler/kernel/issues/I8HQ3W 
 
Link:https://gitee.com/openeuler/kernel/pulls/3552

 

Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents e9368443 062a070f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -713,6 +713,11 @@ static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part)

		if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))
			return false;

		if (part->ro_warned)
			return false;

		part->ro_warned = true;
		pr_warn("Trying to write to read-only block-device %s (partno %d)\n",
			bio_devname(bio, b), part->partno);
		/* Older lvm-tools actually trigger this */
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ struct hd_struct {
	struct device __dev;
	struct kobject *holder_dir;
	bool read_only;
	KABI_FILL_HOLE(bool ro_warned)
	int partno;
	struct partition_meta_info *info;
#ifdef CONFIG_FAIL_MAKE_REQUEST