mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 17:51:43 +00:00
pppoe: remove unnecessary checks in pppoe_flush_dev
pernet memory is guaranteed to exist when notifiers are called. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0a12761bcd
commit
8753d29fd5
@ -290,12 +290,6 @@ static void pppoe_flush_dev(struct net_device *dev)
|
||||
struct pppoe_net *pn;
|
||||
int i;
|
||||
|
||||
BUG_ON(dev == NULL);
|
||||
|
||||
pn = pppoe_pernet(dev_net(dev));
|
||||
if (!pn) /* already freed */
|
||||
return;
|
||||
|
||||
write_lock_bh(&pn->hash_lock);
|
||||
for (i = 0; i < PPPOE_HASH_SIZE; i++) {
|
||||
struct pppox_sock *po = pn->hash_table[i];
|
||||
|
Loading…
Reference in New Issue
Block a user