diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-02-07 16:34:54 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-04-23 16:13:36 -0400 |
commit | 7086721f9c8b59331e164e534f588e075cfd9d3f (patch) | |
tree | 593ddc28b30dba189069579b82ed81996d965df2 /arch/sh/drivers | |
parent | 23d42ee278de1552d67daef5774ba59ff30925db (diff) |
SUNRPC: have svc_recv() check kthread_should_stop()
When using kthreads that call into svc_recv, we want to make sure that
they do not block there for a long time when we're trying to take down
the kthread.
This patch changes svc_recv() to check kthread_should_stop() at the same
places that it checks to see if it's signalled(). Also check just before
svc_recv() tries to schedule(). By making sure that we check it just
after setting the task state we can avoid having to use any locking or
signalling to ensure it doesn't block for a long time.
There's still a chance of a 500ms sleep if alloc_page() fails, but
that should be a rare occurrence and isn't a terribly long time in
the context of a kthread being taken down.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'arch/sh/drivers')
0 files changed, 0 insertions, 0 deletions