mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
ide: Make ide_cdrom_prep_fs() initialize the sense buffer pointer
The changes introduced through commit82ed4db499
assume that the sense buffer pointer in struct scsi_request is initialized for all requests - passthrough and filesystem requests. Hence make sure that that pointer is initialized for filesystem requests. Remove the memset() call that clears .cmd because the scsi_req_init() call in ide_initialize_rq() already initializes the .cmd. Fixes: commit82ed4db499
("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
37cb8e1f8e
commit
4fc930896d
1 changed files with 1 additions and 2 deletions
|
@ -1333,8 +1333,7 @@ static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq)
|
||||||
unsigned long blocks = blk_rq_sectors(rq) / (hard_sect >> 9);
|
unsigned long blocks = blk_rq_sectors(rq) / (hard_sect >> 9);
|
||||||
struct scsi_request *req = scsi_req(rq);
|
struct scsi_request *req = scsi_req(rq);
|
||||||
|
|
||||||
scsi_req_init(req);
|
q->initialize_rq_fn(rq);
|
||||||
memset(req->cmd, 0, BLK_MAX_CDB);
|
|
||||||
|
|
||||||
if (rq_data_dir(rq) == READ)
|
if (rq_data_dir(rq) == READ)
|
||||||
req->cmd[0] = GPCMD_READ_10;
|
req->cmd[0] = GPCMD_READ_10;
|
||||||
|
|
Loading…
Reference in a new issue