public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tim.c.chen@linux.intel.com
Cc: eric.dumazet@gmail.com, viro@zeniv.linux.org.uk,
	ebiederm@xmission.com, ak@linux.intel.com,
	matt.fleming@linux.intel.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [Patch] Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path
Date: Thu, 18 Aug 2011 22:04:32 -0700 (PDT)	[thread overview]
Message-ID: <20110818.220432.1711182086933489213.davem@davemloft.net> (raw)
In-Reply-To: <1313625374.2576.2908.camel@schen9-DESK>

From: Tim Chen <tim.c.chen@linux.intel.com>
Date: Wed, 17 Aug 2011 16:56:14 -0700

> +static __inline__ void scm_release(struct scm_cookie *scm)
> +{
> +	/* keep ref on pid and cred */
> +	scm->pid = NULL;
> +	scm->cred = NULL;
> +	if (scm && scm->fp)
> +		__scm_destroy(scm);
> +}

After dereferencing scm-> already, it seems a big redundant to test
it subsequently against NULL.

  reply	other threads:[~2011-08-19  5:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 23:56 [Patch] Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path Tim Chen
2011-08-19  5:04 ` David Miller [this message]
2011-08-19 16:44   ` Tim Chen
2011-08-23  0:40     ` David Miller
2011-08-23  0:57       ` Tim Chen
2011-08-25  2:43         ` 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=20110818.220432.1711182086933489213.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ak@linux.intel.com \
    --cc=ebiederm@xmission.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox