Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-2.6-microblaze.git] / drivers / scsi / scsi_bsg.c
index 81c3853..b7a4643 100644 (file)
@@ -25,8 +25,8 @@ static int scsi_bsg_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr,
                return -EOPNOTSUPP;
        }
 
-       rq = blk_get_request(q, hdr->dout_xfer_len ?
-                            REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
+       rq = scsi_alloc_request(q, hdr->dout_xfer_len ?
+                               REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
        if (IS_ERR(rq))
                return PTR_ERR(rq);
        rq->timeout = timeout;
@@ -60,7 +60,7 @@ static int scsi_bsg_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr,
                goto out_free_cmd;
 
        bio = rq->bio;
-       blk_execute_rq(NULL, rq, !(hdr->flags & BSG_FLAG_Q_AT_TAIL));
+       blk_execute_rq(rq, !(hdr->flags & BSG_FLAG_Q_AT_TAIL));
 
        /*
         * fill in all the output members
@@ -95,7 +95,7 @@ static int scsi_bsg_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr,
 out_free_cmd:
        scsi_req_free_cmd(scsi_req(rq));
 out_put_request:
-       blk_put_request(rq);
+       blk_mq_free_request(rq);
        return ret;
 }