diff options
author | Christoph Hellwig <hch@lst.de> | 2014-06-28 05:58:42 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:11:27 -0400 |
commit | 3868cf8ea70a57fc3f927872d8296f287ce4b96a (patch) | |
tree | c663a5fa31a457fe4b6597082ae8efbeb381045d /drivers/scsi/sr.c | |
parent | 635d98b1d0cfc2ba3426a701725d31a6102c059a (diff) |
scsi: restructure command initialization for TYPE_FS requests
We should call the device handler prep_fn for all TYPE_FS requests,
not just simple read/write calls that are handled by the disk driver.
Restructure the common I/O code to call the prep_fn handler and zero
out the CDB, and just leave the call to scsi_init_io to the ULDs.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index a7ea27c01286..9feeb3766d7d 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -385,10 +385,9 @@ static int sr_init_command(struct scsi_cmnd *SCpnt) | |||
385 | int block = 0, this_count, s_size; | 385 | int block = 0, this_count, s_size; |
386 | struct scsi_cd *cd; | 386 | struct scsi_cd *cd; |
387 | struct request *rq = SCpnt->request; | 387 | struct request *rq = SCpnt->request; |
388 | struct scsi_device *sdp = SCpnt->device; | ||
389 | int ret; | 388 | int ret; |
390 | 389 | ||
391 | ret = scsi_setup_fs_cmnd(sdp, rq); | 390 | ret = scsi_init_io(SCpnt, GFP_ATOMIC); |
392 | if (ret != BLKPREP_OK) | 391 | if (ret != BLKPREP_OK) |
393 | goto out; | 392 | goto out; |
394 | SCpnt = rq->special; | 393 | SCpnt = rq->special; |