From: Michal Miroslaw Date: Fri, 23 Mar 2007 18:12:21 +0000 (-0700) Subject: [NETFILTER]: nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=370e6a878962cad614eb8c7c5a22240e5cd316bb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- 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); }