linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt
@ 2010-10-05 16:47 Pavel Emelyanov
  2010-10-05 22:46 ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Emelyanov @ 2010-10-05 16:47 UTC (permalink / raw)
  To: J. Bruce Fields, linux-nfs@vger.kernel.org

The task in question is dereferenced above (and is actually never NULL).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
 net/sunrpc/xprt.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 953206d..64a4a94 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -199,8 +199,6 @@ int xprt_reserve_xprt(struct rpc_task *task)
 	if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
 		if (task == xprt->snd_task)
 			return 1;
-		if (task == NULL)
-			return 0;
 		goto out_sleep;
 	}
 	xprt->snd_task = task;
-- 
1.5.5.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt
  2010-10-05 16:47 [PATCH] sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt Pavel Emelyanov
@ 2010-10-05 22:46 ` J. Bruce Fields
  2010-10-06  9:46   ` Pavel Emelyanov
  0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2010-10-05 22:46 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: linux-nfs@vger.kernel.org, Trond Myklebust

On Tue, Oct 05, 2010 at 08:47:16PM +0400, Pavel Emelyanov wrote:
> The task in question is dereferenced above (and is actually never NULL).

Makes sense to me.

(But probably it should go through Trond unless there's some dependency
on your patches in my tree.)

--b.

> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> ---
>  net/sunrpc/xprt.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
> index 953206d..64a4a94 100644
> --- a/net/sunrpc/xprt.c
> +++ b/net/sunrpc/xprt.c
> @@ -199,8 +199,6 @@ int xprt_reserve_xprt(struct rpc_task *task)
>  	if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
>  		if (task == xprt->snd_task)
>  			return 1;
> -		if (task == NULL)
> -			return 0;
>  		goto out_sleep;
>  	}
>  	xprt->snd_task = task;
> -- 
> 1.5.5.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt
  2010-10-05 22:46 ` J. Bruce Fields
@ 2010-10-06  9:46   ` Pavel Emelyanov
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Emelyanov @ 2010-10-06  9:46 UTC (permalink / raw)
  To: J. Bruce Fields, Trond Myklebust; +Cc: linux-nfs@vger.kernel.org

On 10/06/2010 02:46 AM, J. Bruce Fields wrote:
> On Tue, Oct 05, 2010 at 08:47:16PM +0400, Pavel Emelyanov wrote:
>> The task in question is dereferenced above (and is actually never NULL).
> 
> Makes sense to me.
> 
> (But probably it should go through Trond unless there's some dependency
> on your patches in my tree.)

No, no dependency at all. It's OK if this goes through Trond's tree.

> --b.
> 
>>
>> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>> ---
>>  net/sunrpc/xprt.c |    2 --
>>  1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
>> index 953206d..64a4a94 100644
>> --- a/net/sunrpc/xprt.c
>> +++ b/net/sunrpc/xprt.c
>> @@ -199,8 +199,6 @@ int xprt_reserve_xprt(struct rpc_task *task)
>>  	if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
>>  		if (task == xprt->snd_task)
>>  			return 1;
>> -		if (task == NULL)
>> -			return 0;
>>  		goto out_sleep;
>>  	}
>>  	xprt->snd_task = task;
>> -- 
>> 1.5.5.6
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-06  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 16:47 [PATCH] sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt Pavel Emelyanov
2010-10-05 22:46 ` J. Bruce Fields
2010-10-06  9:46   ` Pavel Emelyanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).