aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/xen/biomerge.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c
index 4da69dbf7dca..1bdd02a6d6ac 100644
--- a/drivers/xen/biomerge.c
+++ b/drivers/xen/biomerge.c
@@ -10,8 +10,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
10 unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page)); 10 unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
11 unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page)); 11 unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
12 12
13 return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && 13 return bfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == bfn2;
14 ((bfn1 == bfn2) || ((bfn1+1) == bfn2));
15#else 14#else
16 /* 15 /*
17 * XXX: Add support for merging bio_vec when using different page 16 * XXX: Add support for merging bio_vec when using different page