scsi: stop passing a gfp_mask argument down the command setup path

There is no reason for ULDs to pass in a flag on how to allocate the S/G
lists.  While we don't need GFP_ATOMIC for the blk-mq case because we
don't hold locks, that decision can be made way down the chain without
having to pass a pointless gfp_mask argument.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
このコミットが含まれているのは:
Christoph Hellwig
2014-09-05 18:20:23 -07:00
コミット 3c356bde19
4個のファイルの変更14行の追加16行の削除

ファイルの表示

@@ -786,7 +786,7 @@ static int sd_setup_discard_cmnd(struct scsi_cmnd *cmd)
* amount of blocks described by the request.
*/
blk_add_request_payload(rq, page, len);
ret = scsi_init_io(cmd, GFP_ATOMIC);
ret = scsi_init_io(cmd);
rq->__data_len = nr_bytes;
out:
@@ -880,7 +880,7 @@ static int sd_setup_write_same_cmnd(struct scsi_cmnd *cmd)
* knows how much to actually write.
*/
rq->__data_len = sdp->sector_size;
ret = scsi_init_io(cmd, GFP_ATOMIC);
ret = scsi_init_io(cmd);
rq->__data_len = nr_bytes;
return ret;
}
@@ -914,7 +914,7 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt)
int ret;
unsigned char protect;
ret = scsi_init_io(SCpnt, GFP_ATOMIC);
ret = scsi_init_io(SCpnt);
if (ret != BLKPREP_OK)
goto out;
SCpnt = rq->special;