Skip to content
Commit 24200699 authored by Tony Battersby's avatar Tony Battersby Committed by Greg Kroah-Hartman
Browse files

block: Fix page refcounts for unaligned buffers in __bio_release_pages()

commit 38b43539 upstream.

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

Fixes: 1b151e24

 ("block: Remove special-casing of compound pages")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarTony Battersby <tonyb@cybernetics.com>
Tested-by: default avatarGreg Edwards <gedwards@ddn.com>
Link: https://lore.kernel.org/r/86e592a9-98d4-4cff-a646-0c0084328356@cybernetics.com
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
[ Tony: backport to v6.1 by replacing bio_release_page() loop with
  folio_put_refs() as commits fd363244 and e4cc6465

 are not
  present. ]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f2debd9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment