X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=block%2Fscsi_ioctl.c;h=626ee274c5c4fd7d9d989528ff897f3080f81fb1;hb=7e7b5bb2c424812d5d8220eaf7e0eadddefc8e64;hp=ee9c67d7e1bea2015bc5d8a86287d001e33f20d1;hpb=97d61b8e3aef163a75f80f4762794c154572293d;p=linux-2.6-omap-h63xx.git diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index ee9c67d7e1b..626ee274c5c 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -214,21 +214,10 @@ static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq, return 0; } -/* - * unmap a request that was previously mapped to this sg_io_hdr. handles - * both sg and non-sg sg_io_hdr. - */ -static int blk_unmap_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr) -{ - blk_rq_unmap_user(rq->bio); - blk_put_request(rq); - return 0; -} - static int blk_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr, struct bio *bio) { - int r, ret = 0; + int ret = 0; /* * fill in all the output members @@ -253,12 +242,10 @@ static int blk_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr, ret = -EFAULT; } - rq->bio = bio; - r = blk_unmap_sghdr_rq(rq, hdr); - if (ret) - r = ret; + blk_rq_unmap_user(bio); + blk_put_request(rq); - return r; + return ret; } static int sg_io(struct request_queue *q, struct gendisk *bd_disk,