From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: netdev@vger.kernel.org, andy@greyhouse.net, davem@davemloft.net,
fubar@us.ibm.com
Subject: Re: [PATCH net-next 1/5] bonding: convert to list API and replace bond's custom list
Date: Wed, 31 Jul 2013 11:37:17 -0700 [thread overview]
Message-ID: <20130731113717.32f48d71@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1375283553-32070-2-git-send-email-nikolay@redhat.com>
On Wed, 31 Jul 2013 17:12:29 +0200
Nikolay Aleksandrov <nikolay@redhat.com> wrote:
> diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
> index 390061d..80e288c 100644
> --- a/drivers/net/bonding/bond_3ad.c
> +++ b/drivers/net/bonding/bond_3ad.c
> @@ -143,10 +143,13 @@ static inline struct bonding *__get_bond_by_port(struct port *port)
> */
> static inline struct port *__get_first_port(struct bonding *bond)
> {
> + struct slave *first_slave;
> +
> if (bond->slave_cnt == 0)
> return NULL;
> + first_slave = bond_first_slave(bond);
As Jay said, it would be be better to have bond_first_slave return
NULL (if no slaves), and eliminate slave_cnt. It would also fix
a race here between slave_cnt and all slave's being removed.
next prev parent reply other threads:[~2013-07-31 18:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 15:12 [PATCH net-next 0/5] bonding: groundwork and initial conversion to RCU Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 1/5] bonding: convert to list API and replace bond's custom list Nikolay Aleksandrov
2013-07-31 18:28 ` Jay Vosburgh
2013-07-31 18:42 ` Nikolay Aleksandrov
2013-07-31 18:37 ` Stephen Hemminger [this message]
2013-07-31 18:44 ` Nikolay Aleksandrov
2013-07-31 18:56 ` Stephen Hemminger
2013-07-31 19:00 ` Nikolay Aleksandrov
2013-07-31 18:38 ` Stephen Hemminger
2013-07-31 18:49 ` Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 2/5] bonding: remove unnecessary read_locks of curr_slave_lock Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 3/5] bonding: simplify broadcast_xmit function Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 4/5] bonding: factor out slave id tx code and simplify xmit paths Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 5/5] bonding: initial RCU conversion Nikolay Aleksandrov
2013-08-01 6:46 ` Ding Tianhong
2013-08-01 7:55 ` Nikolay Aleksandrov
2013-07-31 15:27 ` [PATCH net-next 0/5] bonding: groundwork and initial conversion to RCU Eric Dumazet
2013-07-31 15:39 ` Nikolay Aleksandrov
2013-07-31 18:03 ` Jiri Pirko
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=20130731113717.32f48d71@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@redhat.com \
/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.