mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-23 02:18:06 +07:00
uas: Use GFP_NOIO rather then GFP_ATOMIC where possible
We can sleep in our own workqueue (which is the whole reason for having it), and scsi error handlers are also always called from a context which may sleep. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
parent
b83b86a352
commit
e36e64930c
@ -133,7 +133,7 @@ static void uas_do_work(struct work_struct *work)
|
|||||||
struct scsi_pointer *scp = (void *)cmdinfo;
|
struct scsi_pointer *scp = (void *)cmdinfo;
|
||||||
struct scsi_cmnd *cmnd = container_of(scp, struct scsi_cmnd,
|
struct scsi_cmnd *cmnd = container_of(scp, struct scsi_cmnd,
|
||||||
SCp);
|
SCp);
|
||||||
err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC);
|
err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_NOIO);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
cmdinfo->state &= ~IS_IN_WORK_LIST;
|
cmdinfo->state &= ~IS_IN_WORK_LIST;
|
||||||
list_del(&cmdinfo->work);
|
list_del(&cmdinfo->work);
|
||||||
@ -745,7 +745,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd,
|
|||||||
|
|
||||||
devinfo->running_task = 1;
|
devinfo->running_task = 1;
|
||||||
memset(&devinfo->response, 0, sizeof(devinfo->response));
|
memset(&devinfo->response, 0, sizeof(devinfo->response));
|
||||||
sense_urb = uas_submit_sense_urb(shost, GFP_ATOMIC, tag);
|
sense_urb = uas_submit_sense_urb(shost, GFP_NOIO, tag);
|
||||||
if (!sense_urb) {
|
if (!sense_urb) {
|
||||||
shost_printk(KERN_INFO, shost,
|
shost_printk(KERN_INFO, shost,
|
||||||
"%s: %s: submit sense urb failed\n",
|
"%s: %s: submit sense urb failed\n",
|
||||||
@ -754,7 +754,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd,
|
|||||||
spin_unlock_irqrestore(&devinfo->lock, flags);
|
spin_unlock_irqrestore(&devinfo->lock, flags);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
if (uas_submit_task_urb(cmnd, GFP_ATOMIC, function, tag)) {
|
if (uas_submit_task_urb(cmnd, GFP_NOIO, function, tag)) {
|
||||||
shost_printk(KERN_INFO, shost,
|
shost_printk(KERN_INFO, shost,
|
||||||
"%s: %s: submit task mgmt urb failed\n",
|
"%s: %s: submit task mgmt urb failed\n",
|
||||||
__func__, fname);
|
__func__, fname);
|
||||||
|
Loading…
Reference in New Issue
Block a user