diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-05-19 08:24:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-20 00:33:18 -0400 |
commit | 449f4544267e73d5db372971da63634707c32299 (patch) | |
tree | acee6de13f34c179ec46ef7f8a49e66b229f4460 /net | |
parent | 034cfe48d0efc248ba4b725e3a94b95e76fbc5d3 (diff) |
macvlan: remove one synchronize_rcu() call
When one macvlan device is dismantled, we can avoid one
synchronize_rcu() call done after deletion from hash list, since caller
will perform a synchronize_net() call after its ndo_stop() call.
Add a new netdev->dismantle field to signal this dismantle intent.
Reduces RTNL hold time.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 155de2094e71..d94537914a71 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5126,7 +5126,7 @@ static void rollback_registered_many(struct list_head *head) | |||
5126 | list_del(&dev->unreg_list); | 5126 | list_del(&dev->unreg_list); |
5127 | continue; | 5127 | continue; |
5128 | } | 5128 | } |
5129 | 5129 | dev->dismantle = true; | |
5130 | BUG_ON(dev->reg_state != NETREG_REGISTERED); | 5130 | BUG_ON(dev->reg_state != NETREG_REGISTERED); |
5131 | } | 5131 | } |
5132 | 5132 | ||