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: Wed, 24 Aug 2011 19:43:44 -0700 (PDT) [thread overview]
Message-ID: <20110824.194344.423083561694337662.davem@davemloft.net> (raw)
In-Reply-To: <1314061046.2576.2922.camel@schen9-DESK>
From: Tim Chen <tim.c.chen@linux.intel.com>
Date: Mon, 22 Aug 2011 17:57:26 -0700
> On Mon, 2011-08-22 at 17:40 -0700, David Miller wrote:
>> From: Tim Chen <tim.c.chen@linux.intel.com>
>> Date: Fri, 19 Aug 2011 09:44:58 -0700
>>
>> > - /* Only send the fds in the first buffer */
>> > - err = unix_scm_to_skb(siocb->scm, skb, !fds_sent);
>> > + /* Only send the fds and no ref to pid in the first buffer */
>> > + if (fds_sent)
>> > + err = unix_scm_to_skb(siocb->scm, skb, !fds_sent, true);
>> > + else
>> > + err = unix_scm_to_skb(siocb->scm, skb, !fds_sent, false);
>>
>> Just set this final boolean the way the third argument is, there is no
>> reason to replicate the entire function call twice just to set the
>> final argument to what "fds_sent" evaluates to as a boolean.
>>
>> err = unix_scm_to_skb(siocb->scm, skb, !fds_sent, fds_sent);
>>
>> ought to suffice.
>
> Good point. Patch updated as suggested.
Applied.
prev parent reply other threads:[~2011-08-25 2:43 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
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 [this message]
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=20110824.194344.423083561694337662.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