[Open-FCoE] [PATCH v3 10/10] fcoe: Return ERESTARTSYS on rtnl_trylock failure

Yi Zou yi.zou at intel.com
Thu Jan 13 02:20:42 UTC 2011


From: Bhanu Gollapudi <bprakash at broadcom.com>

fcoe driver should return -ERESTARTSYS instead of -ENODEV so
that rtnl lock will be retried.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash at broadcom.com>
Signed-off-by: Yi Zou <yi.zou at intel.com>
---

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

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index cd40fc8..eda70e5 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1948,7 +1948,7 @@ static int fcoe_disable(struct net_device *netdev)
 
 	if (!rtnl_trylock()) {
 		mutex_unlock(&fcoe_config_mutex);
-		return -ENODEV;
+		return -ERESTARTSYS;
 	}
 
 	fcoe = fcoe_hostlist_lookup_port(netdev);
@@ -1992,7 +1992,7 @@ static int fcoe_enable(struct net_device *netdev)
 #endif
 	if (!rtnl_trylock()) {
 		mutex_unlock(&fcoe_config_mutex);
-		return -ENODEV;
+		return -ERESTARTSYS;
 	}
 
 	fcoe = fcoe_hostlist_lookup_port(netdev);
@@ -2035,7 +2035,7 @@ static int fcoe_destroy(struct net_device *netdev)
 #endif
 	if (!rtnl_trylock()) {
 		mutex_unlock(&fcoe_config_mutex);
-		return -ENODEV;
+		return -ERESTARTSYS;
 	}
 
 	fcoe = fcoe_hostlist_lookup_port(netdev);
@@ -2088,7 +2088,7 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode)
 
 	if (!rtnl_trylock()) {
 		mutex_unlock(&fcoe_config_mutex);
-		return -EIO;
+		return -ERESTARTSYS;
 	}
 
 #ifdef CONFIG_FCOE_MODULE




More information about the devel mailing list