Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=370e6a878962cad614eb8c7c5a22240e5cd316bb
Commit:     370e6a878962cad614eb8c7c5a22240e5cd316bb
Parent:     f76cdcee5ba4a3fb41de93d5f1c17fb6ab4d0820
Author:     Michal Miroslaw <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 23 11:12:21 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:41 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 e934770..34de3d8 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);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to