Subject: Re: [PATCH net-next v2 2/10] bonding: rebuild the lock use for bond_mii_monitor()

From: Ding Tianhong <[email-masked]>
Date: Sat, 09 Nov 2013 21:51:03 +0800

于 2013/11/8 23:28, Nikolay Aleksandrov 写道:
> On 11/08/2013 03:07 AM, Ding Tianhong wrote:
> In fact the bond cannot disappear while this function is running, so this test
> should be able to run outside the RCU region if I'm not missing something :-)
> It'll be just as useful as running inside the region, at most a free run may
> happen if there's one slave and it disappears.
>
>
> This is unnecessary, bond_has_slaves() should be enough. See bond_start_xmit()
> and also the list_empty comment in include/linux/rculist.h for more information why.
> My bond_has_slaves() comments apply to all the patches that use it.
>
>

yes, you are right, I make a silly mistake, the bond list itself is no 
need to copy, it
dose not occur any problem if it be changed.

The curr_active_slave needs copy for peer, as it may be changed at 
monitor running.

Regards.
Ding

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>