소스 검색

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 <torvalds@osdl.org>
Linus Torvalds 19 년 전
부모
커밋
4f47707b05
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      net/sunrpc/clnt.c

+ 1 - 1
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) {