]> git.baikalelectronics.ru Git - kernel.git/commit
block: Fix page_is_mergeable() for compound pages
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 17 Aug 2020 19:52:06 +0000 (20:52 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 18 Aug 2020 02:35:53 +0000 (19:35 -0700)
commitc91c5d3a20844b2d2d8a2a7bf69cf47cf0139127
treeb6038be4bcbc16680ed2cec65e10ea1cc6f63933
parent634927c345d3e5936ae669f5a9178fff14f882b5
block: Fix page_is_mergeable() for compound pages

If we pass in an offset which is larger than PAGE_SIZE, then
page_is_mergeable() thinks it's not mergeable with the previous bio_vec,
leading to a large number of bio_vecs being used.  Use a slightly more
obvious test that the two pages are compatible with each other.

Fixes: 4c7e7f06fa6c ("block: only allow contiguous page structs in a bio_vec")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c