From: Linus Torvalds Date: Tue, 10 Jan 2006 16:56:39 +0000 (-0800) Subject: Fix rpc shutdown event condition bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f47707b056bd2e3627ef390557ee93d312daba5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Fix rpc shutdown event condition bug We want to wait for the cl_users to go down to zero, not for it to stay positive. Quoth Trond (who wasn't even the author, but acked the wrong version): "Argh! I need to increase my daily caffeine dosages." Signed-off-by: Linus Torvalds --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index a44da8b3d240..4cef7fa2b740 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -269,7 +269,7 @@ rpc_shutdown_client(struct rpc_clnt *clnt) clnt->cl_dead = 0; rpc_killall_tasks(clnt); wait_event_timeout(destroy_wait, - atomic_read(&clnt->cl_users) > 0, 1*HZ); + !atomic_read(&clnt->cl_users), 1*HZ); } if (atomic_read(&clnt->cl_users) < 0) {