]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
Fix compil dev-blkfront-64k-indirect
authorJulien Grall <julien.grall@citrix.com>
Tue, 1 Dec 2015 18:37:20 +0000 (18:37 +0000)
committerJulien Grall <julien.grall@citrix.com>
Tue, 1 Dec 2015 18:37:20 +0000 (18:37 +0000)
drivers/block/xen-blkfront.c

index deeadabd753d23cd499e9be8f106c311fc1db2d7..471bff22a7dff519efd481d1788845578ec4880f 100644 (file)
@@ -680,7 +680,7 @@ static void blkif_setup_extra_req(struct blkif_request *first,
 static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo)
 {
        struct blkfront_info *info = rinfo->dev_info;
-       struct blkif_request *ring_req;
+       struct blkif_request *ring_req, *extra_ring_req = NULL;
        unsigned long id, extra_id = NO_ASSOCIATED_ID;
        bool require_extra_req = false;
        int i;
@@ -777,7 +777,7 @@ static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *ri
                }
                ring_req->u.rw.nr_segments = num_grant;
                if (unlikely(require_extra_req)) {
-                       extra_id = blkif_ring_get_request(info, req,
+                       extra_id = blkif_ring_get_request(rinfo, req,
                                                          &extra_ring_req);
                        /*
                         * Only the first request contains the scatter-gather
@@ -1406,7 +1406,7 @@ static int blkif_get_final_status(enum blk_req_status s1,
                return BLKIF_RSP_OKAY;
 }
 
-static void blkif_completion(struct blk_shadow *s,
+static bool blkif_completion(unsigned long *id,
                             struct blkfront_ring_info *rinfo,
                             struct blkif_response *bret)
 {
@@ -1414,7 +1414,7 @@ static void blkif_completion(struct blk_shadow *s,
        struct scatterlist *sg;
        int num_sg, num_grant;
        struct blkfront_info *info = rinfo->dev_info;
-       struct blk_shadow *s = &info->shadow[*id];
+       struct blk_shadow *s = &rinfo->shadow[*id];
        struct copy_from_grant data = {
                .grant_idx = 0,
        };
@@ -1424,7 +1424,7 @@ static void blkif_completion(struct blk_shadow *s,
 
        /* The I/O request may be split in two */
        if (unlikely(s->associated_id != NO_ASSOCIATED_ID)) {
-               struct blk_shadow *s2 = &info->shadow[s->associated_id];
+               struct blk_shadow *s2 = &rinfo->shadow[s->associated_id];
 
                /* Keep the status of the current response in shadow */
                s->status = blkif_rsp_to_req_status(bret->status);
@@ -1456,7 +1456,7 @@ static void blkif_completion(struct blk_shadow *s,
                 * We don't need anymore the second request, so recycling
                 * it now.
                 */
-               if (add_id_to_freelist(info, s->associated_id))
+               if (add_id_to_freelist(rinfo, s->associated_id))
                        WARN(1, "%s: can't recycle the second part (id = %ld) of the request\n",
                             info->gd->disk_name, s->associated_id);
        }