bonding: create bond_first_slave_rcu()
authordingtianhong <dingtianhong@huawei.com>
Fri, 13 Dec 2013 02:19:55 +0000 (10:19 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Dec 2013 06:58:02 +0000 (01:58 -0500)
commite001bfad913bf119fb67c1e8dd2d4ec1f5d392fa
treefe08e42121a1b5e9bf173af18c04e78c884cc5bf
parent2e52f4fe3655c7a2311070c6713f7feabc75486c
bonding: create bond_first_slave_rcu()

The bond_first_slave_rcu() will be used to instead of bond_first_slave()
in rcu_read_lock().

According to the Jay Vosburgh's suggestion, the struct netdev_adjacent
should hide from users who wanted to use it directly. so I package a
new function to get the first slave of the bond.

Suggested-by: Nikolay Aleksandrov <nikolay@redhat.com>
Suggested-by: Jay Vosburgh <fubar@us.ibm.com>
Suggested-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bonding.h
include/linux/netdevice.h
net/core/dev.c