summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>2007-03-23 11:12:21 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:27:41 -0700
commit370e6a878962cad614eb8c7c5a22240e5cd316bb (patch)
tree887439d6fe104d45da231170a63d1e47bbde46ad
parentf76cdcee5ba4a3fb41de93d5f1c17fb6ab4d0820 (diff)
downloadlinux-370e6a878962cad614eb8c7c5a22240e5cd316bb.tar.gz
linux-370e6a878962cad614eb8c7c5a22240e5cd316bb.tar.bz2
linux-370e6a878962cad614eb8c7c5a22240e5cd316bb.zip
[NETFILTER]: nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()
No other function calls __nfulnl_send() with inst->skb == NULL than nfulnl_timer(). Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/netfilter/nfnetlink_log.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index e934770339d3..34de3d84e2fc 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -360,9 +360,6 @@ __nfulnl_send(struct nfulnl_instance *inst)
{
int status;
- if (!inst->skb)
- return 0;
-
if (inst->qlen > 1)
inst->lastnlh->nlmsg_type = NLMSG_DONE;
@@ -386,7 +383,8 @@ static void nfulnl_timer(unsigned long data)
UDEBUG("timer function called, flushing buffer\n");
spin_lock_bh(&inst->lock);
- __nfulnl_send(inst);
+ if (inst->skb)
+ __nfulnl_send(inst);
spin_unlock_bh(&inst->lock);
instance_put(inst);
}