From: Bob Liu Date: Fri, 1 Jul 2016 19:45:57 +0000 (-0400) Subject: xen-blkfront: fix places not updated after introducing 64KB page granularity X-Git-Tag: v4.1.12-92~107^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=afa3b15fd8065a07ef3595db6a71e1e22143f912;p=users%2Fjedix%2Flinux-maple.git xen-blkfront: fix places not updated after introducing 64KB page granularity Two places didn't get updated when 64KB page granularity was introduced, this patch fix them. Orabug: 23720696 Signed-off-by: Bob Liu --- diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 160abdbb1f9f..8e652e108f19 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1321,7 +1321,7 @@ free_shadow: rinfo->ring_ref[i] = GRANT_INVALID_REF; } } - free_pages((unsigned long)rinfo->ring.sring, get_order(info->nr_ring_pages * PAGE_SIZE)); + free_pages((unsigned long)rinfo->ring.sring, get_order(info->nr_ring_pages * XEN_PAGE_SIZE)); rinfo->ring.sring = NULL; if (rinfo->irq) @@ -2014,7 +2014,7 @@ static int blkif_recover(struct blkfront_info *info) blkfront_gather_backend_features(info); segs = info->max_indirect_segments ? : BLKIF_MAX_SEGMENTS_PER_REQUEST; - blk_queue_max_segments(info->rq, segs); + blk_queue_max_segments(info->rq, segs / GRANTS_PER_PSEG); for (r_index = 0; r_index < info->nr_rings; r_index++) { struct blkfront_ring_info *rinfo = &info->rinfo[r_index];