diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-23 11:12:50 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-25 22:27:42 -0700 |
commit | 9afdb00c80b0b9c20435ce690b5287fa2434ef44 (patch) | |
tree | bba4c192ee9e09ef630e1688e21f32a742b1cd57 /net/netfilter | |
parent | 370e6a878962cad614eb8c7c5a22240e5cd316bb (diff) | |
download | blackbird-obmc-linux-9afdb00c80b0b9c20435ce690b5287fa2434ef44.tar.gz blackbird-obmc-linux-9afdb00c80b0b9c20435ce690b5287fa2434ef44.zip |
[NETFILTER]: nfnetlink_log: remove conditional locking
This is gross, have the wrapper function take the lock.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 34de3d84e2fc..0ae06561ae9a 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -195,20 +195,14 @@ out_unlock: static int __nfulnl_send(struct nfulnl_instance *inst); static void -_instance_destroy2(struct nfulnl_instance *inst, int lock) +__instance_destroy(struct nfulnl_instance *inst) { /* first pull it out of the global list */ - if (lock) - write_lock_bh(&instances_lock); - UDEBUG("removing instance %p (queuenum=%u) from hash\n", inst, inst->group_num); hlist_del(&inst->hlist); - if (lock) - write_unlock_bh(&instances_lock); - /* then flush all pending packets from skb */ spin_lock_bh(&inst->lock); @@ -230,15 +224,11 @@ _instance_destroy2(struct nfulnl_instance *inst, int lock) } static inline void -__instance_destroy(struct nfulnl_instance *inst) -{ - _instance_destroy2(inst, 0); -} - -static inline void instance_destroy(struct nfulnl_instance *inst) { - _instance_destroy2(inst, 1); + write_lock_bh(&instances_lock); + __instance_destroy(inst); + write_unlock_bh(&instances_lock); } static int |