diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index bde6ee5333eb..9e7206ebadf0 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1795,11 +1795,7 @@ static int fcoe_disable(struct net_device *netdev) | |||
1795 | } | 1795 | } |
1796 | #endif | 1796 | #endif |
1797 | 1797 | ||
1798 | if (!rtnl_trylock()) { | 1798 | rtnl_lock(); |
1799 | mutex_unlock(&fcoe_config_mutex); | ||
1800 | return -ERESTARTSYS; | ||
1801 | } | ||
1802 | |||
1803 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1799 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1804 | rtnl_unlock(); | 1800 | rtnl_unlock(); |
1805 | 1801 | ||
@@ -1839,11 +1835,7 @@ static int fcoe_enable(struct net_device *netdev) | |||
1839 | goto out_nodev; | 1835 | goto out_nodev; |
1840 | } | 1836 | } |
1841 | #endif | 1837 | #endif |
1842 | if (!rtnl_trylock()) { | 1838 | rtnl_lock(); |
1843 | mutex_unlock(&fcoe_config_mutex); | ||
1844 | return -ERESTARTSYS; | ||
1845 | } | ||
1846 | |||
1847 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1839 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1848 | rtnl_unlock(); | 1840 | rtnl_unlock(); |
1849 | 1841 | ||
@@ -1882,11 +1874,7 @@ static int fcoe_destroy(struct net_device *netdev) | |||
1882 | goto out_nodev; | 1874 | goto out_nodev; |
1883 | } | 1875 | } |
1884 | #endif | 1876 | #endif |
1885 | if (!rtnl_trylock()) { | 1877 | rtnl_lock(); |
1886 | mutex_unlock(&fcoe_config_mutex); | ||
1887 | return -ERESTARTSYS; | ||
1888 | } | ||
1889 | |||
1890 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1878 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1891 | if (!fcoe) { | 1879 | if (!fcoe) { |
1892 | rtnl_unlock(); | 1880 | rtnl_unlock(); |
@@ -1948,11 +1936,7 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode) | |||
1948 | struct fc_lport *lport; | 1936 | struct fc_lport *lport; |
1949 | 1937 | ||
1950 | mutex_lock(&fcoe_config_mutex); | 1938 | mutex_lock(&fcoe_config_mutex); |
1951 | 1939 | rtnl_lock(); | |
1952 | if (!rtnl_trylock()) { | ||
1953 | mutex_unlock(&fcoe_config_mutex); | ||
1954 | return -ERESTARTSYS; | ||
1955 | } | ||
1956 | 1940 | ||
1957 | #ifdef CONFIG_FCOE_MODULE | 1941 | #ifdef CONFIG_FCOE_MODULE |
1958 | /* | 1942 | /* |