Skip to content

Commit

Permalink
Fix rpc shutdown event condition bug
Browse files Browse the repository at this point in the history
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 <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Jan 10, 2006
1 parent a9c8281 commit 4f47707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4f47707

Please sign in to comment.