Skip to contentSkip to conversation

sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt

PATCH In review Pavel Emelyanov 2 participants 3 messages Oct 5, 2010 – Oct 6, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt

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

---
 net/sunrpc/xprt.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
net/sunrpc/xprt.c +0 -2
index 953206d..64a4a94 100644
@@ -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;
Signature · 1 line
1.5.5.6
#1 lore raw
Quoted 1 line · Pavel Emelyanov

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.

Quoted 26 lines
---
 net/sunrpc/xprt.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
net/sunrpc/xprt.c +0 -2
index 953206d..64a4a94 100644
@@ -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;
Signature · 6 lines
1.5.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 7 lines · J. Bruce Fields
Quoted 1 line · Pavel Emelyanov

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.

Quoted 30 lines

--b.

Quoted 26 lines
---
 net/sunrpc/xprt.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
net/sunrpc/xprt.c +0 -2
index 953206d..64a4a94 100644
@@ -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;
Signature · 6 lines
1.5.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

.