[PATCH v3 09/10] libfcoe: Handle ERESTARTSYS for fcoe transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bhanu Gollapudi <bprakash@xxxxxxxxxxxx>

When the LLDDs return ERESTARTSYS as a result of not succeeding
rtnl_trylock(), fcoe_transport_* functions should return
restart_syscall().

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@xxxxxxxxxxxx>
Signed-off-by: Yi Zou <yi.zou@xxxxxxxxx>
---

 drivers/scsi/fcoe/fcoe_transport.c |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index 8a630aa..95fe16b 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -360,7 +360,10 @@ out_nodev:
 		(rc) ? "failed" : "succeeded",
 		(netdev) ? netdev->name : "n/a");
 
-	return rc;
+	if (rc == -ERESTARTSYS)
+		return restart_syscall();
+	else
+		return rc;
 }
 
 /**
@@ -420,7 +423,10 @@ out_nodev:
 		(rc) ? "failed" : "succeeded",
 		(netdev) ? netdev->name : "n/a");
 
-	return rc;
+	if (rc == -ERESTARTSYS)
+		return restart_syscall();
+	else
+		return rc;
 }
 
 /**
@@ -472,7 +478,11 @@ out_putdev:
 	dev_put(netdev);
 out_nodev:
 	mutex_unlock(&ft_mutex);
-	return rc;
+
+	if (rc == -ERESTARTSYS)
+		return restart_syscall();
+	else
+		return rc;
 }
 
 /**
@@ -524,7 +534,10 @@ out_putdev:
 	dev_put(netdev);
 out_nodev:
 	mutex_unlock(&ft_mutex);
-	return rc;
+	if (rc == -ERESTARTSYS)
+		return restart_syscall();
+	else
+		return rc;
 }
 
 /**

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux