diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-11-07 02:35:55 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2014-03-04 18:38:20 -0500 |
commit | e36e64930cffd94e1c37fdb82f35989384aa946b (patch) | |
tree | 33003d06d85aebb70a364dfb52cf20186690982d | |
parent | b83b86a352280cc8cbbf3760096c703986143b81 (diff) |
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>
-rw-r--r-- | drivers/usb/storage/uas.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 7fc4ad207752..8023944f2501 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c | |||
@@ -133,7 +133,7 @@ static void uas_do_work(struct work_struct *work) | |||
133 | struct scsi_pointer *scp = (void *)cmdinfo; | 133 | struct scsi_pointer *scp = (void *)cmdinfo; |
134 | struct scsi_cmnd *cmnd = container_of(scp, struct scsi_cmnd, | 134 | struct scsi_cmnd *cmnd = container_of(scp, struct scsi_cmnd, |
135 | SCp); | 135 | SCp); |
136 | err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC); | 136 | err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_NOIO); |
137 | if (!err) { | 137 | if (!err) { |
138 | cmdinfo->state &= ~IS_IN_WORK_LIST; | 138 | cmdinfo->state &= ~IS_IN_WORK_LIST; |
139 | list_del(&cmdinfo->work); | 139 | list_del(&cmdinfo->work); |
@@ -745,7 +745,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd, | |||
745 | 745 | ||
746 | devinfo->running_task = 1; | 746 | devinfo->running_task = 1; |
747 | memset(&devinfo->response, 0, sizeof(devinfo->response)); | 747 | memset(&devinfo->response, 0, sizeof(devinfo->response)); |
748 | sense_urb = uas_submit_sense_urb(shost, GFP_ATOMIC, tag); | 748 | sense_urb = uas_submit_sense_urb(shost, GFP_NOIO, tag); |
749 | if (!sense_urb) { | 749 | if (!sense_urb) { |
750 | shost_printk(KERN_INFO, shost, | 750 | shost_printk(KERN_INFO, shost, |
751 | "%s: %s: submit sense urb failed\n", | 751 | "%s: %s: submit sense urb failed\n", |
@@ -754,7 +754,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd, | |||
754 | spin_unlock_irqrestore(&devinfo->lock, flags); | 754 | spin_unlock_irqrestore(&devinfo->lock, flags); |
755 | return FAILED; | 755 | return FAILED; |
756 | } | 756 | } |
757 | if (uas_submit_task_urb(cmnd, GFP_ATOMIC, function, tag)) { | 757 | if (uas_submit_task_urb(cmnd, GFP_NOIO, function, tag)) { |
758 | shost_printk(KERN_INFO, shost, | 758 | shost_printk(KERN_INFO, shost, |
759 | "%s: %s: submit task mgmt urb failed\n", | 759 | "%s: %s: submit task mgmt urb failed\n", |
760 | __func__, fname); | 760 | __func__, fname); |