Unverified Commit 9a3c16d6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11316 block: fix pin count management when merging same-page segments

parents 6827f6e2 d2190452
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -283,12 +283,11 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
					n = bytes;

				if (!bio_add_hw_page(rq->q, bio, page, n, offs,
						     max_sectors, &same_page)) {
					if (same_page)
						put_page(page);
						     max_sectors, &same_page))
					break;
				}

				if (same_page)
					put_page(page);
				added += n;
				bytes -= n;
				offs = 0;