SUNRPC: Fix broken kthread_should_stop test in svc_get_next_xprt
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 3 Aug 2014 17:03:11 +0000 (13:03 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Sun, 17 Aug 2014 16:00:11 +0000 (12:00 -0400)
commita4aa8054a60c545f100826271ac9f04c34bf828d
tree9c9c190c54eecb09aa03e4645528663bc02383b3
parent983c684466e02b21f83c025ea539deee6c0aeac0
SUNRPC: Fix broken kthread_should_stop test in svc_get_next_xprt

We should definitely not be exiting svc_get_next_xprt() with the
thread enqueued. Fix this by ensuring that we fall through to
the dequeue.
Also move the test itself outside the spin lock protected section.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/svc_xprt.c