]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:56:47 +0000 (11:56 +0200)
commit38172a2742f551abf15056d93fca1331c771480e
tree749cb01082b3f3bd09d6467aedab47d1505a03da
parent0e9c2ece82bd7b161f01225d38ca8904b18c6885
block: ensure iov_iter advances for added pages

BugLink: https://bugs.launchpad.net/bugs/1990162
[ Upstream commit 325347d965e7ccf5424a05398807a6d801846612 ]

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: 576ed9135489c ("block: use bio_add_page in bio_iov_iter_get_pages")
Fixes: c58c0074c54c2 ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
block/bio.c