mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
[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 <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
e866cfa939
commit
532347e2bb
@ -268,7 +268,8 @@ rpc_shutdown_client(struct rpc_clnt *clnt)
|
|||||||
clnt->cl_oneshot = 0;
|
clnt->cl_oneshot = 0;
|
||||||
clnt->cl_dead = 0;
|
clnt->cl_dead = 0;
|
||||||
rpc_killall_tasks(clnt);
|
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) {
|
if (atomic_read(&clnt->cl_users) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user