Changing existing files is not a very good changelog, and hints that this is doing multiple things at a time. > diff --git a/block/blk.h b/block/blk.h > index 47fba9362e60..9ee271a22423 100644 > --- a/block/blk.h > +++ b/block/blk.h > @@ -78,6 +78,13 @@ static inline bool biovec_phys_mergeable(struct request_queue *q, > phys_addr_t addr1 = page_to_phys(vec1->bv_page) + vec1->bv_offset; > phys_addr_t addr2 = page_to_phys(vec2->bv_page) + vec2->bv_offset; > > +#ifdef CONFIG_KMSAN > + /* > + * Merging consequent physical pages may not work correctly under KMSAN > + * if their metadata pages aren't consequent. Just disable merging. > + */ > + return false; > +#endif > if (addr1 + vec1->bv_len != addr2) > return false; > if (xen_domain() && !xen_biovec_phys_mergeable(vec1, vec2->bv_page)) e.g. this looks pretty standaline. And could be simplified to: if (IS_ENABLED(CONFIG_KMSAN)) return false;