sunrpc: Remove useless if (task == NULL) from xprt_reserve_xprt
authorPavel Emelyanov <xemul@parallels.com>
Tue, 5 Oct 2010 16:47:16 +0000 (20:47 +0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 19 Oct 2010 14:48:16 +0000 (10:48 -0400)
The task in question is dereferenced above (and is actually never NULL).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprt.c

index 953206d8c6c2b436a95645a8d36faecddd63f2da..64a4a94fd6dd9b30d2c8b1bdef7daa03c98c7f1b 100644 (file)
@@ -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;