[SCSI] ibmvfc: Fixup GFP flags for target allocations
authorBrian King <brking@linux.vnet.ibm.com>
Thu, 28 May 2009 21:17:24 +0000 (16:17 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 8 Jun 2009 18:07:31 +0000 (13:07 -0500)
Since target allocations can occur while resetting the virtual adapter,
we shouldn't be using GFP_KERNEL for them as it could hang. Switch to
use GFP_NOIO.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ibmvscsi/ibmvfc.c

index 879c51133c9554485627ec7c2582c8cc332ad6c7..c450a346590ea3f5fef2e83701be57f1ee09768d 100644 (file)
@@ -3420,7 +3420,7 @@ static int ibmvfc_alloc_target(struct ibmvfc_host *vhost, u64 scsi_id)
        }
        spin_unlock_irqrestore(vhost->host->host_lock, flags);
 
-       tgt = mempool_alloc(vhost->tgt_pool, GFP_KERNEL);
+       tgt = mempool_alloc(vhost->tgt_pool, GFP_NOIO);
        if (!tgt) {
                dev_err(vhost->dev, "Target allocation failure for scsi id %08llx\n",
                        scsi_id);