From: Ingo Molnar Date: Tue, 10 Jan 2006 04:52:53 +0000 (-0800) Subject: [PATCH] nfs: sleep_on() removal X-Git-Tag: v2.6.16-rc1~565 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=532347e2bbae9e849816dc7b12a3d0f2c42d4944;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [PATCH] nfs: sleep_on() removal 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 5530ac8..a44da8b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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) {