Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e5e30aa authored by Sahitya Tummala's avatar Sahitya Tummala
Browse files

block: Fix the setting of same_page variable



The same_page variable inside the function __bio_try_merge_page()
must be set to true if the merge happened within the same page.
As some the callers of this function take action based on that.

Change-Id: Iae4a7170aeaffcc0b9c424368c7d8127d51a177b
Fixes: 1bbb4bd9 ("block: disable multi-page bvec")
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent f291b2fb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -807,6 +807,7 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page,
		struct bio_vec *bv = &bio->bi_io_vec[bio->bi_vcnt - 1];

		if (page == bv->bv_page && off == bv->bv_offset + bv->bv_len) {
			*same_page = true;
			bv->bv_len += len;
			bio->bi_iter.bi_size += len;
			return true;