Re: [PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()

2007-02-14 Thread Michał Mirosław
Patch updated to apply after a new version of 13/14:

No other function calls __nfulnl_send() with inst->skb == NULL than 
nfulnl_timer().

Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]>

--- linux-2.6.20/net/netfilter/nfnetlink_log.c.12   2007-02-14 
12:27:09.0 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c  2007-02-14 12:53:04.0 
+0100
@@ -373,9 +373,6 @@ __nfulnl_send(struct nfulnl_instance *in
 {
int status;
 
-   if (!inst->skb)
-   return 0;
-
if (inst->qlen > 1)
inst->lastnlh->nlmsg_type = NLMSG_DONE;
 
@@ -399,7 +396,8 @@ static void nfulnl_timer(unsigned long d
UDEBUG("timer function called, flushing buffer\n");
 
spin_lock_bh(>lock);
-   __nfulnl_send(inst);
+   if (inst->skb)
+   __nfulnl_send(inst);
spin_unlock_bh(>lock);
instance_put(inst);
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst-skb != NULL in __nfulnl_send()

2007-02-14 Thread Michał Mirosław
Patch updated to apply after a new version of 13/14:

No other function calls __nfulnl_send() with inst-skb == NULL than 
nfulnl_timer().

Signed-off-by: Michał Mirosław [EMAIL PROTECTED]

--- linux-2.6.20/net/netfilter/nfnetlink_log.c.12   2007-02-14 
12:27:09.0 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c  2007-02-14 12:53:04.0 
+0100
@@ -373,9 +373,6 @@ __nfulnl_send(struct nfulnl_instance *in
 {
int status;
 
-   if (!inst-skb)
-   return 0;
-
if (inst-qlen  1)
inst-lastnlh-nlmsg_type = NLMSG_DONE;
 
@@ -399,7 +396,8 @@ static void nfulnl_timer(unsigned long d
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 linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()

2007-02-12 Thread Michał Mirosław
No other function calls __nfulnl_send() with inst->skb == NULL than 
nfulnl_timer().

Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]>

--- linux-2.6.20/net/netfilter/nfnetlink_log.c.12   2007-02-12 
17:58:01.0 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c  2007-02-12 17:58:56.0 
+0100
@@ -375,9 +375,6 @@ __nfulnl_send(struct nfulnl_instance *in
 {
int status;
 
-   if (!inst->skb)
-   return 0;
-
if (inst->qlen > 1)
inst->lastnlh->nlmsg_type = NLMSG_DONE;
 
@@ -403,7 +400,8 @@ static void nfulnl_timer(unsigned long d
spin_lock_bh(>lock);
if (timer_pending(>timer))/* is it always true or false 
here? */
del_timer(>timer);
-   __nfulnl_send(inst);
+   if (inst->skb)
+   __nfulnl_send(inst);
spin_unlock_bh(>lock);
instance_put(inst);
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst-skb != NULL in __nfulnl_send()

2007-02-12 Thread Michał Mirosław
No other function calls __nfulnl_send() with inst-skb == NULL than 
nfulnl_timer().

Signed-off-by: Michał Mirosław [EMAIL PROTECTED]

--- linux-2.6.20/net/netfilter/nfnetlink_log.c.12   2007-02-12 
17:58:01.0 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c  2007-02-12 17:58:56.0 
+0100
@@ -375,9 +375,6 @@ __nfulnl_send(struct nfulnl_instance *in
 {
int status;
 
-   if (!inst-skb)
-   return 0;
-
if (inst-qlen  1)
inst-lastnlh-nlmsg_type = NLMSG_DONE;
 
@@ -403,7 +400,8 @@ static void nfulnl_timer(unsigned long d
spin_lock_bh(inst-lock);
if (timer_pending(inst-timer))/* is it always true or false 
here? */
del_timer(inst-timer);
-   __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 linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/