diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:18:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:18:27 -0500 |
commit | 53846a21c1766326bb14ce8ab6e997a0c120675d (patch) | |
tree | 37b04485e29844b4e734479181276a2f4d2447e4 /fs/nfs/callback.c | |
parent | 2e9abdd9bad485970b37cd53a82f92702054984c (diff) | |
parent | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (diff) |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (103 commits)
SUNRPC,RPCSEC_GSS: spkm3--fix config dependencies
SUNRPC,RPCSEC_GSS: spkm3: import contexts using NID_cast5_cbc
LOCKD: Make nlmsvc_traverse_shares return void
LOCKD: nlmsvc_traverse_blocks return is unused
SUNRPC,RPCSEC_GSS: fix krb5 sequence numbers.
NFSv4: Dont list system.nfs4_acl for filesystems that don't support it.
SUNRPC,RPCSEC_GSS: remove unnecessary kmalloc of a checksum
SUNRPC: Ensure rpc_call_async() always calls tk_ops->rpc_release()
SUNRPC: Fix memory barriers for req->rq_received
NFS: Fix a race in nfs_sync_inode()
NFS: Clean up nfs_flush_list()
NFS: Fix a race with PG_private and nfs_release_page()
NFSv4: Ensure the callback daemon flushes signals
SUNRPC: Fix a 'Busy inodes' error in rpc_pipefs
NFS, NLM: Allow blocking locks to respect signals
NFS: Make nfs_fhget() return appropriate error values
NFSv4: Fix an oops in nfs4_fill_super
lockd: blocks should hold a reference to the nlm_file
NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE
NFSv4: Send the delegation stateid for SETATTR calls
...
Diffstat (limited to 'fs/nfs/callback.c')
-rw-r--r-- | fs/nfs/callback.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index fcd97406a778..99d2cfbce863 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -55,7 +55,12 @@ static void nfs_callback_svc(struct svc_rqst *rqstp) | |||
55 | 55 | ||
56 | complete(&nfs_callback_info.started); | 56 | complete(&nfs_callback_info.started); |
57 | 57 | ||
58 | while (nfs_callback_info.users != 0 || !signalled()) { | 58 | for(;;) { |
59 | if (signalled()) { | ||
60 | if (nfs_callback_info.users == 0) | ||
61 | break; | ||
62 | flush_signals(current); | ||
63 | } | ||
59 | /* | 64 | /* |
60 | * Listen for a request on the socket | 65 | * Listen for a request on the socket |
61 | */ | 66 | */ |
@@ -73,6 +78,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp) | |||
73 | svc_process(serv, rqstp); | 78 | svc_process(serv, rqstp); |
74 | } | 79 | } |
75 | 80 | ||
81 | svc_exit_thread(rqstp); | ||
76 | nfs_callback_info.pid = 0; | 82 | nfs_callback_info.pid = 0; |
77 | complete(&nfs_callback_info.stopped); | 83 | complete(&nfs_callback_info.stopped); |
78 | unlock_kernel(); | 84 | unlock_kernel(); |
@@ -134,11 +140,13 @@ int nfs_callback_down(void) | |||
134 | 140 | ||
135 | lock_kernel(); | 141 | lock_kernel(); |
136 | down(&nfs_callback_sema); | 142 | down(&nfs_callback_sema); |
137 | if (--nfs_callback_info.users || nfs_callback_info.pid == 0) | 143 | nfs_callback_info.users--; |
138 | goto out; | 144 | do { |
139 | kill_proc(nfs_callback_info.pid, SIGKILL, 1); | 145 | if (nfs_callback_info.users != 0 || nfs_callback_info.pid == 0) |
140 | wait_for_completion(&nfs_callback_info.stopped); | 146 | break; |
141 | out: | 147 | if (kill_proc(nfs_callback_info.pid, SIGKILL, 1) < 0) |
148 | break; | ||
149 | } while (wait_for_completion_timeout(&nfs_callback_info.stopped, 5*HZ) == 0); | ||
142 | up(&nfs_callback_sema); | 150 | up(&nfs_callback_sema); |
143 | unlock_kernel(); | 151 | unlock_kernel(); |
144 | return ret; | 152 | return ret; |