]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[PATCH] The blk_rq_map_user() change missed an update in scsi_ioctl.c
authorJames Bottomley <James.Bottomley@SteelEye.com>
Mon, 20 Jun 2005 12:07:17 +0000 (14:07 +0200)
committerJens Axboe <axboe@suse.de>
Mon, 20 Jun 2005 12:07:17 +0000 (14:07 +0200)
Signed-off-by: Jens Axboe <axboe@suse.de>
drivers/block/scsi_ioctl.c

index 09a7e73a081299cb26db0c3c0d14d8883b8ae54c..b35cb75c7528f034f7ee8b39f68a2686c58c680a 100644 (file)
@@ -216,7 +216,7 @@ static int sg_io(struct file *file, request_queue_t *q,
                struct gendisk *bd_disk, struct sg_io_hdr *hdr)
 {
        unsigned long start_time;
-       int reading, writing, ret;
+       int reading, writing, ret = 0;
        struct request *rq;
        struct bio *bio;
        char sense[SCSI_SENSE_BUFFERSIZE];
@@ -249,7 +249,6 @@ static int sg_io(struct file *file, request_queue_t *q,
                        reading = 1;
                        break;
                }
-       }
 
        rq = blk_get_request(q, writing ? WRITE : READ, GFP_KERNEL);
        if (!rq)
@@ -335,7 +334,7 @@ static int sg_io(struct file *file, request_queue_t *q,
                        hdr->sb_len_wr = len;
        }
 
-       if (blk_rq_unmap_user(rq, bio, hdr->dxfer_len))
+       if (blk_rq_unmap_user(bio, hdr->dxfer_len))
                ret = -EFAULT;
 
        /* may not have succeeded, but output values written to control