summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-05 07:25:26 +0100
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 18:24:30 +0100
commit212cd8bfe12bb115e7bc9e119fe1411451829afb (patch)
treed62c6926786ec934a51f27e7053da4fe795980f4 /drivers/scsi/st.c
parent[SCSI] st: convert cross_eof to use st_scsi_kern_execute (diff)
downloadlinux-212cd8bfe12bb115e7bc9e119fe1411451829afb.tar.xz
linux-212cd8bfe12bb115e7bc9e119fe1411451829afb.zip
[SCSI] st: convert st_flush to use st_scsi_kern_execute
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>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 34630a611f61..708e9e90678f 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -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;
}