[PATCH] net/sunrpc/clnt.c: remove sleep_on_timeout() usage From: Nishanth Aravamudan Directly use wait-queues instead of the deprecated sleep_on_timeout(). Since the sleep in this function is unconditional, wait_event_timeout() does not appear to be appropriate. Patch is compile-tested. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Index: linux-kj/net/sunrpc/clnt.c =================================================================== --- linux-kj.orig/net/sunrpc/clnt.c 2005-09-21 01:19:03.000000000 +0400 +++ linux-kj/net/sunrpc/clnt.c 2005-09-21 01:23:48.000000000 +0400 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -258,6 +259,7 @@ out_no_clnt: int rpc_shutdown_client(struct rpc_clnt *clnt) { + DEFINE_WAIT(wait); dprintk("RPC: shutting down %s client for %s, tasks=%d\n", clnt->cl_protname, clnt->cl_server, atomic_read(&clnt->cl_users)); @@ -267,7 +269,9 @@ rpc_shutdown_client(struct rpc_clnt *cln clnt->cl_oneshot = 0; clnt->cl_dead = 0; rpc_killall_tasks(clnt); - sleep_on_timeout(&destroy_wait, 1*HZ); + prepare_to_wait(&destroy_wait, &wait, TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ); + finish_wait(&destroy_wait, &wait); } if (atomic_read(&clnt->cl_users) < 0) {