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

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

 



From: Bhanu Gollapudi <bprakash@xxxxxxxxxxxx>

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

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

 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

--
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