Commit 212cd8bf authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[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: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarKai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 39ade4b1
...@@ -1288,11 +1288,17 @@ static int st_flush(struct file *filp, fl_owner_t id) ...@@ -1288,11 +1288,17 @@ static int st_flush(struct file *filp, fl_owner_t id)
cmd[0] = WRITE_FILEMARKS; cmd[0] = WRITE_FILEMARKS;
cmd[4] = 1 + STp->two_fm; cmd[4] = 1 + STp->two_fm;
SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, SRpnt = st_allocate_request(STp);
STp->device->request_queue->rq_timeout,
MAX_WRITE_RETRIES, 1);
if (!SRpnt) { 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; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment