diff options
author | Michal Miroslaw <mirq-linux@rere.qmqm.pl> | 2007-03-23 14:12:21 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:41 -0400 |
commit | 370e6a878962cad614eb8c7c5a22240e5cd316bb (patch) | |
tree | 887439d6fe104d45da231170a63d1e47bbde46ad | |
parent | f76cdcee5ba4a3fb41de93d5f1c17fb6ab4d0820 (diff) |
[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.c | 6 |
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) | |||
360 | { | 360 | { |
361 | int status; | 361 | int status; |
362 | 362 | ||
363 | if (!inst->skb) | ||
364 | return 0; | ||
365 | |||
366 | if (inst->qlen > 1) | 363 | if (inst->qlen > 1) |
367 | inst->lastnlh->nlmsg_type = NLMSG_DONE; | 364 | inst->lastnlh->nlmsg_type = NLMSG_DONE; |
368 | 365 | ||
@@ -386,7 +383,8 @@ static void nfulnl_timer(unsigned long data) | |||
386 | UDEBUG("timer function called, flushing buffer\n"); | 383 | UDEBUG("timer function called, flushing buffer\n"); |
387 | 384 | ||
388 | spin_lock_bh(&inst->lock); | 385 | spin_lock_bh(&inst->lock); |
389 | __nfulnl_send(inst); | 386 | if (inst->skb) |
387 | __nfulnl_send(inst); | ||
390 | spin_unlock_bh(&inst->lock); | 388 | spin_unlock_bh(&inst->lock); |
391 | instance_put(inst); | 389 | instance_put(inst); |
392 | } | 390 | } |