Re: [PATCH v3 11/15] SUNRPC: Make xs_tcp_close() do a socket shutdown rather than a sock_release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 10, 2015 at 10:54 AM, Anna Schumaker
<Anna.Schumaker@xxxxxxxxxx> wrote:
> Hi Trond,
>
> On 02/09/2015 05:48 PM, Trond Myklebust wrote:
>> Use of socket shutdown() means that we monitor the shutdown process
>> through the xs_tcp_state_change() callback, so it is preferable to
>> a full close in all cases unless we're destroying the transport.
>>
>> Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
>> ---
>>  net/sunrpc/xprtsock.c | 6 +-----
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
>> index 3d83cbd32ef2..0279e8ffb14a 100644
>> --- a/net/sunrpc/xprtsock.c
>> +++ b/net/sunrpc/xprtsock.c
>> @@ -857,10 +857,7 @@ static void xs_close(struct rpc_xprt *xprt)
>>
>>  static void xs_tcp_close(struct rpc_xprt *xprt)
>>  {
>> -     if (test_and_clear_bit(XPRT_CONNECTION_CLOSE, &xprt->state))
>> -             xs_close(xprt);
>> -     else
>> -             xs_tcp_shutdown(xprt);
>> +     xs_tcp_shutdown(xprt);
>
> Can we remove xs_tcp_close() and call tcp_shutdown() directly instead?

Ack. I've added a patch for that.

-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux