summaryrefslogtreecommitdiff
path: root/drivers/vhost/scsi.c
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2021-02-27 19:59:56 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-05 01:37:02 +0300
commit08694199477da412baf1852c6d1bf5fedbd40c7e (patch)
tree50e8c2314eee8fc16304a8d98d941eca8fcf5ba3 /drivers/vhost/scsi.c
parent0fa50a8b1244e7fc7363712e2c14a27db740cdcb (diff)
downloadlinux-08694199477da412baf1852c6d1bf5fedbd40c7e.tar.xz
scsi: target: core: Add gfp_t arg to target_cmd_init_cdb()
tcm_loop could be used like a normal block device, so we can't use GFP_KERNEL and should use GFP_NOIO. This adds a gfp_t arg to target_cmd_init_cdb() and converts the users. For every driver but loop GFP_KERNEL is kept. This will also be useful in subsequent patches where loop needs to do target_submit_prep() from interrupt context to get a ref to the se_device, and so it will need to use GFP_ATOMIC. Link: https://lore.kernel.org/r/20210227170006.5077-16-michael.christie@oracle.com Tested-by: Laurence Oberman <loberman@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/vhost/scsi.c')
-rw-r--r--drivers/vhost/scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index ec7ffd51fe5b..9b448a197cb5 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -811,7 +811,7 @@ static void vhost_scsi_submission_work(struct work_struct *work)
if (target_submit_prep(se_cmd, cmd->tvc_cdb, sg_ptr,
cmd->tvc_sgl_count, NULL, 0, sg_prot_ptr,
- cmd->tvc_prot_sgl_count))
+ cmd->tvc_prot_sgl_count, GFP_KERNEL))
return;
target_submit(se_cmd);