Skip to content

Commit

Permalink
netpoll: use DEFINE_STATIC_SRCU() to define netpoll_srcu
Browse files Browse the repository at this point in the history
DEFINE_STATIC_SRCU() defines srcu struct and do init at build time.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lai Jiangshan authored and David S. Miller committed Mar 17, 2013
1 parent 6681712 commit 7f9421c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static struct sk_buff_head skb_pool;

static atomic_t trapped;

static struct srcu_struct netpoll_srcu;
DEFINE_STATIC_SRCU(netpoll_srcu);

#define USEC_PER_POLL 50
#define NETPOLL_RX_ENABLED 1
Expand Down Expand Up @@ -1212,7 +1212,6 @@ EXPORT_SYMBOL(netpoll_setup);
static int __init netpoll_init(void)
{
skb_queue_head_init(&skb_pool);
init_srcu_struct(&netpoll_srcu);
return 0;
}
core_initcall(netpoll_init);
Expand Down

0 comments on commit 7f9421c

Please sign in to comment.