]> git.baikalelectronics.ru Git - kernel.git/commit
packet: less dev_put() calls
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 2 Nov 2009 09:43:32 +0000 (10:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Nov 2009 11:41:29 +0000 (03:41 -0800)
commit580334554fb26adf1aaa358c03a312509bcc7e3e
treea3cc01a84509099099d88cc17bf5c0850355525a
parent157c6d998a1bd70f23828e841709188335478dfc
packet: less dev_put() calls

- packet_sendmsg_spkt() can use dev_get_by_name_rcu() to avoid touching device refcount.

- packet_getname_spkt() & packet_getname() can use dev_get_by_index_rcu() to
  avoid touching device refcount too.

tpacket_snd() & packet_snd() can not use RCU yet because they can sleep when
allocating skb.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c