netfilter: Simply the tests for enabling and disabling the ingress queue hook
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 10 Jul 2015 23:13:58 +0000 (18:13 -0500)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Jul 2015 15:51:43 +0000 (17:51 +0200)
commit4c0911566dec7755d15cb89239fb2db4447f7a62
tree73aab52ccf78e2b1592c335b69bed499aea6fa93
parent70aa996601335ca3069190ebcdae8870828086a8
netfilter: Simply the tests for enabling and disabling the ingress queue hook

Replace an overcomplicated switch statement with a simple if statement.

This also removes the ingress queue enable outside of nf_hook_mutex as
the protection provided by the mutex is not necessary and the code is
clearer having both of the static key increments together.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/core.c