Skip to content

Commit

Permalink
[PATCH] nfs: sleep_on() removal
Browse files Browse the repository at this point in the history
Convert sleep_on() to wait_event_timeout().  Probably safe with the BKL but
could be racy once BKL use in NFS-client is gone.

Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jan 10, 2006
1 parent e866cfa commit 532347e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ rpc_shutdown_client(struct rpc_clnt *clnt)
clnt->cl_oneshot = 0;
clnt->cl_dead = 0;
rpc_killall_tasks(clnt);
sleep_on_timeout(&destroy_wait, 1*HZ);
wait_event_timeout(destroy_wait,
atomic_read(&clnt->cl_users) > 0, 1*HZ);
}

if (atomic_read(&clnt->cl_users) < 0) {
Expand Down

0 comments on commit 532347e

Please sign in to comment.