All of lore.kernel.org
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Subject: Re: [PATCH net-2.6] bonding:restore backup and inactive flag of slave
Date: Mon, 15 Aug 2011 16:18:12 +0000 (UTC)	[thread overview]
Message-ID: <j2bgs2$pf5$1@dough.gmane.org> (raw)
In-Reply-To: 13dbe805d13bba461e50483c0162ce8bc1366204.1313403625.git.panweiping3@gmail.com

On Mon, 15 Aug 2011 18:25:16 +0800, Weiping Pan wrote:

> 
> diff --git a/drivers/net/bonding/bond_main.c
> b/drivers/net/bonding/bond_main.c index 38a83ac..3ed9827 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -3419,9 +3419,27 @@ static int bond_xmit_hash_policy_l2(struct 
sk_buff *skb, int count)
>  static int bond_open(struct net_device *bond_dev) {
>  	struct bonding *bond = netdev_priv(bond_dev);
> +	struct slave *slave;
> +	int i;
>  
>  	bond->kill_timers = 0;
>  
> +	// restore slave->backup and slave->inactive


Please use C-style comment.

> +	read_lock(&bond->lock);
> +	read_lock(&bond->curr_slave_lock);
> +	if (bond->slave_cnt > 0) {


You can move the second read_lock() under this if().



  reply	other threads:[~2011-08-15 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15  9:44 Bonding problem Eduard Sinelnikov
2011-08-15 10:22 ` WeipingPan
2011-08-15 10:25 ` [PATCH net-2.6] bonding:restore backup and inactive flag of slave Weiping Pan
2011-08-15 16:18   ` WANG Cong [this message]
2011-08-16  1:57     ` [PATCH net-2.6 V2] bonding:reset " Weiping Pan
2011-08-16 12:30       ` WANG Cong
2011-08-18  3:12         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='j2bgs2$pf5$1@dough.gmane.org' \
    --to=xiyou.wangcong@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.