Commit 8e4a4189 authored by Tony Battersby's avatar Tony Battersby Committed by Martin K. Petersen

scsi: sg: update comment for blk_get_request()

The calling convention of blk_get_request() has changed in lk 4.18; update
the comment in sg.c to match.

Fixes: ff005a06 ("block: sanitize blk_get_request calling conventions")
Signed-off-by: default avatarTony Battersby <tonyb@cybernetics.com>
Acked-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c170e5a8
...@@ -1741,15 +1741,11 @@ sg_start_req(Sg_request *srp, unsigned char *cmd) ...@@ -1741,15 +1741,11 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
* *
* With scsi-mq enabled, there are a fixed number of preallocated * With scsi-mq enabled, there are a fixed number of preallocated
* requests equal in number to shost->can_queue. If all of the * requests equal in number to shost->can_queue. If all of the
* preallocated requests are already in use, then using GFP_ATOMIC with * preallocated requests are already in use, then blk_get_request()
* blk_get_request() will return -EWOULDBLOCK, whereas using GFP_KERNEL * will sleep until an active command completes, freeing up a request.
* will cause blk_get_request() to sleep until an active command * Although waiting in an asynchronous interface is less than ideal, we
* completes, freeing up a request. Neither option is ideal, but * do not want to use BLK_MQ_REQ_NOWAIT here because userspace might
* GFP_KERNEL is the better choice to prevent userspace from getting an * not expect an EWOULDBLOCK from this condition.
* unexpected EWOULDBLOCK.
*
* With scsi-mq disabled, blk_get_request() with GFP_KERNEL usually
* does not sleep except under memory pressure.
*/ */
rq = blk_get_request(q, hp->dxfer_direction == SG_DXFER_TO_DEV ? rq = blk_get_request(q, hp->dxfer_direction == SG_DXFER_TO_DEV ?
REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0); REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
......
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