* [patch]xprt: remove redundant null check
@ 2011-03-10 17:40 j223yang
0 siblings, 0 replies; only message in thread
From: j223yang @ 2011-03-10 17:40 UTC (permalink / raw)
To: linux-kernel; +Cc: Trond.Myklebust
'req' is dereferenced before checked for NULL.
The patch simply removes the check.
Signed-off-by: Jinqiu Yang<crindy646@gmail.com>
---
xprt.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/net/sunrpc/xprt.c 2011-03-10 11:20:16.408039185 -0500
+++ b/net/sunrpc/xprt.c 2011-03-10 11:32:28.132164761 -0500
@@ -202,10 +202,9 @@ int xprt_reserve_xprt(struct rpc_task *t
goto out_sleep;
}
xprt->snd_task = task;
- if (req) {
- req->rq_bytes_sent = 0;
- req->rq_ntrans++;
- }
+ req->rq_bytes_sent = 0;
+ req->rq_ntrans++;
+
return 1;
out_sleep:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-10 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-10 17:40 [patch]xprt: remove redundant null check j223yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®