mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
[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>
This commit is contained in:
parent
f76cdcee5b
commit
370e6a8789
@ -360,9 +360,6 @@ __nfulnl_send(struct nfulnl_instance *inst)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (!inst->skb)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (inst->qlen > 1)
|
if (inst->qlen > 1)
|
||||||
inst->lastnlh->nlmsg_type = NLMSG_DONE;
|
inst->lastnlh->nlmsg_type = NLMSG_DONE;
|
||||||
|
|
||||||
@ -386,6 +383,7 @@ static void nfulnl_timer(unsigned long data)
|
|||||||
UDEBUG("timer function called, flushing buffer\n");
|
UDEBUG("timer function called, flushing buffer\n");
|
||||||
|
|
||||||
spin_lock_bh(&inst->lock);
|
spin_lock_bh(&inst->lock);
|
||||||
|
if (inst->skb)
|
||||||
__nfulnl_send(inst);
|
__nfulnl_send(inst);
|
||||||
spin_unlock_bh(&inst->lock);
|
spin_unlock_bh(&inst->lock);
|
||||||
instance_put(inst);
|
instance_put(inst);
|
||||||
|
Loading…
Reference in New Issue
Block a user