public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ying Xue <ying.xue@windriver•com>
To: Jon Maloy <jon.maloy@ericsson•com>,
	"viro@ZenIV•linux.org.uk" <viro@ZenIV•linux.org.uk>,
	"hch@lst•de" <hch@lst•de>,
	"davem@davemloft•net" <davem@davemloft•net>
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	Erik Hugne <erik.hugne@ericsson•com>
Subject: Re: [PATCH net-next 1/2] tipc: Don't use iocb argument in socket layer
Date: Sat, 28 Feb 2015 10:29:19 +0800	[thread overview]
Message-ID: <54F127FF.1060207@windriver.com> (raw)
In-Reply-To: <A2BAEFC30C8FD34388F02C9B3121859D1C399393@eusaamb103.ericsson.se>

On 02/27/2015 09:30 PM, Jon Maloy wrote:
>> > socket *sock, long *timeo_p)  static int tipc_sendmsg(struct kiocb *iocb,
>> > struct socket *sock,
>> >  			struct msghdr *m, size_t dsz)
>> >  {
>> > +	struct sock *sk = sock->sk;
>> > +	int ret;
> alternative method: 
> 
>                 bool has_lock = false;
>> > +
>> > +	lock_sock(sk);
> 
>              if (!owned_by_user(sk) {
>                             lock_sock(sk);
>                             has_lock = true;
>               }      
>> > +	ret = __tipc_sendmsg(sock, m, dsz);
>               [expand  code here, instead of an extra call]
> 
>               if (has_lock))
>                       release_sock();
> 
> Not sure what I prefer, but I just wanted to indicate
> this option.
> 

Thanks! In my opinion, the current version seems more clear. :)

> You can anyway add a "Reviewed-by" from me.

Regards,
Ying

  reply	other threads:[~2015-02-28  2:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 11:06 [PATCH net-next 0/2] net: Remove iocb argument from sendmsg and recvmsg Ying Xue
2015-02-27 11:06 ` [PATCH net-next 1/2] tipc: Don't use iocb argument in socket layer Ying Xue
2015-02-27 13:30   ` Jon Maloy
2015-02-28  2:29     ` Ying Xue [this message]
2015-02-28 21:59     ` David Miller
2015-02-27 11:06 ` [PATCH net-next 2/2] net: Remove iocb argument from sendmsg and recvmsg Ying Xue
2015-02-28 22:12 ` [PATCH net-next 0/2] " David Miller
2015-03-02  0:52   ` Ying Xue

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=54F127FF.1060207@windriver.com \
    --to=ying.xue@windriver$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=erik.hugne@ericsson$(echo .)com \
    --cc=hch@lst$(echo .)de \
    --cc=jon.maloy@ericsson$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=viro@ZenIV$(echo .)linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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