All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netfilter-devel@lists.netfilter.org, Patrick McHardy <kaber@trash.net>
Subject: [NETFILTER 04/12]: nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()
Date: Fri, 23 Mar 2007 15:05:04 +0100 (MET)	[thread overview]
Message-ID: <20070323140438.22987.68301.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20070323140433.22987.44867.sendpatchset@localhost.localdomain>

[NETFILTER]: nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()

Simple micro-optimization: don't call instance_put() on known NULL pointers.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 7e6bd92e1cdbb5bd83285d2a2f7dc151c853511d
tree 829f4920a6df42202656aeaa7d9871fbf0ce8a48
parent 797c0ab0be222b58be043f42eee79f2503b4ab08
author Michal Miroslaw <mirq-linux@rere.qmqm.pl> Thu, 22 Mar 2007 23:01:33 +0100
committer Patrick McHardy <kaber@trash.net> Fri, 23 Mar 2007 11:00:21 +0100

 net/netfilter/nfnetlink_log.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index d14cf51..d4b45e2 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -810,13 +810,13 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
 					       NETLINK_CB(skb).pid);
 			if (!inst) {
 				ret = -EINVAL;
-				goto out_put;
+				goto out;
 			}
 			break;
 		case NFULNL_CFG_CMD_UNBIND:
 			if (!inst) {
 				ret = -ENODEV;
-				goto out_put;
+				goto out;
 			}
 
 			if (inst->peer_pid != NETLINK_CB(skb).pid) {
@@ -849,7 +849,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
 				"group=%u pid=%u =>ENOENT\n",
 				group_num, NETLINK_CB(skb).pid);
 			ret = -ENOENT;
-			goto out_put;
+			goto out;
 		}
 
 		if (inst->peer_pid != NETLINK_CB(skb).pid) {

  parent reply	other threads:[~2007-03-23 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 14:04 [NETFILTER 00/12]: Netfilter update part II Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 01/12]: Remove changelogs and CVS IDs Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 02/12]: nfnetlink_log: don't count max(a,b) twice Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 03/12]: nfnetlink_log: kill duplicate code Patrick McHardy
2007-03-23 14:05 ` Patrick McHardy [this message]
2007-03-23 14:05 ` [NETFILTER 05/12]: nfnetlink_log: micro-optimization: don't modify destroyed instance Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 06/12]: nfnetlink_log: iterator functions need iter_state * only Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 07/12]: nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send() Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 08/12]: nfnetlink_log: remove conditional locking Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 09/12]: Use setup_timer Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 10/12]: nf_conntrack: don't use nfct in skb if conntrack is disabled Patrick McHardy
2007-03-23 14:05 ` [NETFILTER 11/12]: nf_conntrack: kill destroy() in struct nf_conntrack for diet Patrick McHardy
2007-03-23 14:05 ` [NETFILTER] nfnetlink: netlink_run_queue() already checks for NLM_F_REQUEST Patrick McHardy
2007-03-23 18:24 ` [NETFILTER 00/12]: Netfilter update part II David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070323140438.22987.68301.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.