]> git.baikalelectronics.ru Git - kernel.git/commit
block: ensure iov_iter advances for added pages
authorKeith Busch <kbusch@kernel.org>
Tue, 12 Jul 2022 15:32:54 +0000 (08:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:01 +0000 (14:24 +0200)
commit9411b96bd71341d0c9fd08516562559fe76170fc
treec2a6348aa3eef24b190319a3f73905b07e8229c5
parent214d071eca14bd4d909081f9e7e1883370da9464
block: ensure iov_iter advances for added pages

[ Upstream commit 1b3ebd46b03907fa04e3723cafb6ae85c7e2889b ]

There are cases where a bio may not accept additional pages, and the iov
needs to advance to the last data length that was accepted. The zone
append used to handle this correctly, but was inadvertently broken when
the setup was made common with the normal r/w case.

Fixes: 956b6e8353966 ("block: use bio_add_page in bio_iov_iter_get_pages")
Fixes: 6f5a0eb93d937 ("block/bio: remove duplicate append pages code")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20220712153256.2202024-1-kbusch@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/bio.c