diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2012-03-06 17:09:01 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-03-27 03:26:36 -0400 |
commit | 49d0e64b6a61acea3bcdd6b36be3972111edecc5 (patch) | |
tree | 891b000418ae40765a47bf8c4241c345e7ee93dd /drivers | |
parent | 76c8ae4b2fbcbc92601c48e1b534c35638c8d597 (diff) |
[SCSI] iscsi class: fix gfp use in ping compl and host event
If a ping or host event were to occur when memory is low
we do not want to use GFP_KERNEL, because the paths
sending them cannot block for data to be written. These
paths might be needed to recover write paths. Use GFP_NOIO
instead.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index fac31730addf..1cf640e575da 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -1486,7 +1486,7 @@ void iscsi_post_host_event(uint32_t host_no, struct iscsi_transport *transport, | |||
1486 | struct iscsi_uevent *ev; | 1486 | struct iscsi_uevent *ev; |
1487 | int len = NLMSG_SPACE(sizeof(*ev) + data_size); | 1487 | int len = NLMSG_SPACE(sizeof(*ev) + data_size); |
1488 | 1488 | ||
1489 | skb = alloc_skb(len, GFP_KERNEL); | 1489 | skb = alloc_skb(len, GFP_NOIO); |
1490 | if (!skb) { | 1490 | if (!skb) { |
1491 | printk(KERN_ERR "gracefully ignored host event (%d):%d OOM\n", | 1491 | printk(KERN_ERR "gracefully ignored host event (%d):%d OOM\n", |
1492 | host_no, code); | 1492 | host_no, code); |
@@ -1504,7 +1504,7 @@ void iscsi_post_host_event(uint32_t host_no, struct iscsi_transport *transport, | |||
1504 | if (data_size) | 1504 | if (data_size) |
1505 | memcpy((char *)ev + sizeof(*ev), data, data_size); | 1505 | memcpy((char *)ev + sizeof(*ev), data, data_size); |
1506 | 1506 | ||
1507 | iscsi_multicast_skb(skb, ISCSI_NL_GRP_ISCSID, GFP_KERNEL); | 1507 | iscsi_multicast_skb(skb, ISCSI_NL_GRP_ISCSID, GFP_NOIO); |
1508 | } | 1508 | } |
1509 | EXPORT_SYMBOL_GPL(iscsi_post_host_event); | 1509 | EXPORT_SYMBOL_GPL(iscsi_post_host_event); |
1510 | 1510 | ||
@@ -1517,7 +1517,7 @@ void iscsi_ping_comp_event(uint32_t host_no, struct iscsi_transport *transport, | |||
1517 | struct iscsi_uevent *ev; | 1517 | struct iscsi_uevent *ev; |
1518 | int len = NLMSG_SPACE(sizeof(*ev) + data_size); | 1518 | int len = NLMSG_SPACE(sizeof(*ev) + data_size); |
1519 | 1519 | ||
1520 | skb = alloc_skb(len, GFP_KERNEL); | 1520 | skb = alloc_skb(len, GFP_NOIO); |
1521 | if (!skb) { | 1521 | if (!skb) { |
1522 | printk(KERN_ERR "gracefully ignored ping comp: OOM\n"); | 1522 | printk(KERN_ERR "gracefully ignored ping comp: OOM\n"); |
1523 | return; | 1523 | return; |
@@ -1533,7 +1533,7 @@ void iscsi_ping_comp_event(uint32_t host_no, struct iscsi_transport *transport, | |||
1533 | ev->r.ping_comp.data_size = data_size; | 1533 | ev->r.ping_comp.data_size = data_size; |
1534 | memcpy((char *)ev + sizeof(*ev), data, data_size); | 1534 | memcpy((char *)ev + sizeof(*ev), data, data_size); |
1535 | 1535 | ||
1536 | iscsi_multicast_skb(skb, ISCSI_NL_GRP_ISCSID, GFP_KERNEL); | 1536 | iscsi_multicast_skb(skb, ISCSI_NL_GRP_ISCSID, GFP_NOIO); |
1537 | } | 1537 | } |
1538 | EXPORT_SYMBOL_GPL(iscsi_ping_comp_event); | 1538 | EXPORT_SYMBOL_GPL(iscsi_ping_comp_event); |
1539 | 1539 | ||