Commit 5905afc
block: fix pin count management when merging same-page segments
There is no need to unpin the added page when adding it to the bio fails
as that is done by the loop below. Instead we want to unpin it when adding
a single page to the bio more than once as bio_release_pages will only
unpin it once.
Fixes: d1916c8 ("block: move same page handling from __bio_add_pc_page to the callers")
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 5a26e45 commit 5905afc
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 318 | + | |
321 | 319 | | |
322 | | - | |
323 | 320 | | |
| 321 | + | |
| 322 | + | |
324 | 323 | | |
325 | 324 | | |
326 | 325 | | |
| |||
0 commit comments