Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23945
b: refs/heads/master
c: 1dd761e
h: refs/heads/master
i:
  23943: e3b7b08
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 20, 2006
1 parent e86208f commit 16390c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5428154827c2bf7cfdc9dab60db1e0eaa57c027a
refs/heads/master: 1dd761e9070aa2e543df3db41bd75ed4b8f2fab9
19 changes: 13 additions & 6 deletions trunk/fs/nfs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)

complete(&nfs_callback_info.started);

while (nfs_callback_info.users != 0 || !signalled()) {
for(;;) {
if (signalled()) {
if (nfs_callback_info.users == 0)
break;
flush_signals(current);
}
/*
* Listen for a request on the socket
*/
Expand Down Expand Up @@ -135,11 +140,13 @@ int nfs_callback_down(void)

lock_kernel();
down(&nfs_callback_sema);
if (--nfs_callback_info.users || nfs_callback_info.pid == 0)
goto out;
kill_proc(nfs_callback_info.pid, SIGKILL, 1);
wait_for_completion(&nfs_callback_info.stopped);
out:
nfs_callback_info.users--;
do {
if (nfs_callback_info.users != 0 || nfs_callback_info.pid == 0)
break;
if (kill_proc(nfs_callback_info.pid, SIGKILL, 1) < 0)
break;
} while (wait_for_completion_timeout(&nfs_callback_info.stopped, 5*HZ) == 0);
up(&nfs_callback_sema);
unlock_kernel();
return ret;
Expand Down

0 comments on commit 16390c3

Please sign in to comment.