[PATCH] bonding: fix a locking bug in bond_release

bond_release returns EINVAL without releasing the bond lock if the
slave device is not being bonded by the bond. The following patch
ensures that the lock is released in this case.

Signed-off-by: Stephen J. Bevan <stephen@dino.dnsalias.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by Jay Vosburgh and committed by Jeff Garzik f5e2a7b2 66cc5d5a

+1
+1
drivers/net/bonding/bond_main.c
··· 1581 1581 printk(KERN_INFO DRV_NAME 1582 1582 ": %s: %s not enslaved\n", 1583 1583 bond_dev->name, slave_dev->name); 1584 + write_unlock_bh(&bond->lock); 1584 1585 return -EINVAL; 1585 1586 } 1586 1587