Commit 2a80ee36 authored by Mike Anderson's avatar Mike Anderson Committed by James Bottomley

[PATCH] media change check fails for busy unplugged device

If a request is sent through scsi_wait_req the function may be woken up
from the completion by a function other than scsi_wait_done. This can
happen as a result of cases that return BLKPREP_KILL in the scsi_prep_fn
function.

author: Mike Anderson <andmike@us.ibm.com>
patch_version: Thu Jan 29 09:03:44 UTC 2004

 patched-2.6-andmike/drivers/scsi/scsi_lib.c |    2 ++
 1 files changed, 2 insertions(+)
parent 6d9e5ab3
......@@ -238,6 +238,8 @@ void scsi_wait_req(struct scsi_request *sreq, const void *cmnd, void *buffer,
generic_unplug_device(sreq->sr_device->request_queue);
wait_for_completion(&wait);
sreq->sr_request->waiting = NULL;
if (sreq->sr_request->rq_status != RQ_SCSI_DONE)
sreq->sr_result |= (DRIVER_ERROR << 24);
__scsi_release_request(sreq);
}
......
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