diff options
author | Jianhua Xie <Jianhua.Xie@freescale.com> | 2014-10-27 10:03:08 (GMT) |
---|---|---|
committer | Jianhua Xie <Jianhua.Xie@freescale.com> | 2015-03-09 06:55:05 (GMT) |
commit | dd08fda785600c8319551c7ae751ea978a15db97 (patch) | |
tree | 098243a3ecbbb31920f6a5370cac51d9bbf98aab /drivers | |
parent | b00c20808b3e12f38f3e5145e3d95e8bec9920ef (diff) | |
download | linux-fsl-qoriq-dd08fda785600c8319551c7ae751ea978a15db97.tar.xz |
bonding: Remove a pair of duplicate readlock()
Near the caller, old codes have below read lock:
......
readlock(bond->lock);
......
readlock(bond->lock);
readunlock(bond->lock);
...
readunlock(bond->unlock);
......
The read lock in middle of above lines is unnecessary, which should
be removed.
Change-Id: Icbb1b3a15007d413101c8a36151e85dfaedd6e68
Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/28614
Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/hw_distribution.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/bonding/hw_distribution.c b/drivers/net/bonding/hw_distribution.c index 1ef0ada..1881366 100644 --- a/drivers/net/bonding/hw_distribution.c +++ b/drivers/net/bonding/hw_distribution.c @@ -352,14 +352,11 @@ bool are_all_slaves_linkup(struct bonding *bond) { struct slave *slave; - read_lock(&bond->lock); bond_for_each_slave(bond, slave) if (!(SLAVE_IS_OK(slave))) { - read_unlock(&bond->lock); return false; } - read_unlock(&bond->lock); return true; } |