]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>
Fri, 23 Mar 2007 18:12:21 +0000 (11:12 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:41 +0000 (22:27 -0700)
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>
net/netfilter/nfnetlink_log.c

index e934770339d38201fe5a802b3ee9fb4370c55740..34de3d84e2fc7139efacf035f2b04f92efd37ec9 100644 (file)
@@ -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);
 }