block: Fix page refcounts for unaligned buffers in __bio_release_pages()
authorTony Battersby <tonyb@cybernetics.com>
Thu, 29 Feb 2024 18:08:09 +0000 (13:08 -0500)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Mar 2024 15:26:42 +0000 (08:26 -0700)
commit38b43539d64b2fa020b3b9a752a986769f87f7a6
treebe61caf426858e1c9a399ad12d65b90da8edd661
parent268283244c0f018dec8bf4a9c69ce50684561f46
block: Fix page refcounts for unaligned buffers in __bio_release_pages()

Fix an incorrect number of pages being released for buffers that do not
start at the beginning of a page.

Fixes: 1b151e2435fc ("block: Remove special-casing of compound pages")
Cc: stable@vger.kernel.org
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Tested-by: Greg Edwards <gedwards@ddn.com>
Link: https://lore.kernel.org/r/86e592a9-98d4-4cff-a646-0c0084328356@cybernetics.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c