]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] st: convert st_flush to use st_scsi_kern_execute
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 5 Dec 2008 06:25:26 +0000 (15:25 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 29 Dec 2008 17:24:30 +0000 (11:24 -0600)
This replaces st_do_scsi in st_flush (WRITE FILEMARKS) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/st.c

index 34630a611f613f76da22f76943c4728ebe82bf07..708e9e90678f63aedc3373f9126352fd35659a50 100644 (file)
@@ -1288,11 +1288,17 @@ static int st_flush(struct file *filp, fl_owner_t id)
                cmd[0] = WRITE_FILEMARKS;
                cmd[4] = 1 + STp->two_fm;
 
-               SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE,
-                                  STp->device->request_queue->rq_timeout,
-                                  MAX_WRITE_RETRIES, 1);
+               SRpnt = st_allocate_request(STp);
                if (!SRpnt) {
-                       result = (STp->buffer)->syscall_result;
+                       result = STp->buffer->syscall_result;
+                       goto out;
+               }
+
+               result = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0,
+                                             STp->device->request_queue->rq_timeout,
+                                             MAX_WRITE_RETRIES);
+               if (result) {
+                       st_release_request(SRpnt);
                        goto out;
                }