diff options
author | Alexandros Batsakis <batsakis@netapp.com> | 2010-02-05 06:45:03 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-03-02 12:16:12 -0500 |
commit | 888ef2e3f8b7b8daeb031bfb4ad1fd4fa817e193 (patch) | |
tree | d50044d998e636232f1110324d6485a92c20daf2 /fs | |
parent | f895c53f8ace3c3e49ebf9def90e63fc6d46d2bf (diff) |
nfs: kill renewd before clearing client minor version
renewd should be synchronously killed before we destroy the session in
nfs4_clear_minor_version
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
[Trond.Myklebust@netapp.com: clean up to remove 'unused function
warning when !CONFIG_NFS_V4]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/client.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index ee77713ce68b..2274f1737336 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -164,30 +164,7 @@ error_0: | |||
164 | return ERR_PTR(err); | 164 | return ERR_PTR(err); |
165 | } | 165 | } |
166 | 166 | ||
167 | static void nfs4_shutdown_client(struct nfs_client *clp) | ||
168 | { | ||
169 | #ifdef CONFIG_NFS_V4 | ||
170 | if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state)) | ||
171 | nfs4_kill_renewd(clp); | ||
172 | BUG_ON(!RB_EMPTY_ROOT(&clp->cl_state_owners)); | ||
173 | if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state)) | ||
174 | nfs_idmap_delete(clp); | ||
175 | |||
176 | rpc_destroy_wait_queue(&clp->cl_rpcwaitq); | ||
177 | #endif | ||
178 | } | ||
179 | |||
180 | /* | ||
181 | * Destroy the NFS4 callback service | ||
182 | */ | ||
183 | static void nfs4_destroy_callback(struct nfs_client *clp) | ||
184 | { | ||
185 | #ifdef CONFIG_NFS_V4 | 167 | #ifdef CONFIG_NFS_V4 |
186 | if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) | ||
187 | nfs_callback_down(clp->cl_minorversion); | ||
188 | #endif /* CONFIG_NFS_V4 */ | ||
189 | } | ||
190 | |||
191 | /* | 168 | /* |
192 | * Clears/puts all minor version specific parts from an nfs_client struct | 169 | * Clears/puts all minor version specific parts from an nfs_client struct |
193 | * reverting it to minorversion 0. | 170 | * reverting it to minorversion 0. |
@@ -202,9 +179,33 @@ static void nfs4_clear_client_minor_version(struct nfs_client *clp) | |||
202 | 179 | ||
203 | clp->cl_call_sync = _nfs4_call_sync; | 180 | clp->cl_call_sync = _nfs4_call_sync; |
204 | #endif /* CONFIG_NFS_V4_1 */ | 181 | #endif /* CONFIG_NFS_V4_1 */ |
182 | } | ||
205 | 183 | ||
184 | /* | ||
185 | * Destroy the NFS4 callback service | ||
186 | */ | ||
187 | static void nfs4_destroy_callback(struct nfs_client *clp) | ||
188 | { | ||
189 | if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) | ||
190 | nfs_callback_down(clp->cl_minorversion); | ||
191 | } | ||
192 | |||
193 | static void nfs4_shutdown_client(struct nfs_client *clp) | ||
194 | { | ||
195 | if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state)) | ||
196 | nfs4_kill_renewd(clp); | ||
197 | nfs4_clear_client_minor_version(clp); | ||
206 | nfs4_destroy_callback(clp); | 198 | nfs4_destroy_callback(clp); |
199 | if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state)) | ||
200 | nfs_idmap_delete(clp); | ||
201 | |||
202 | rpc_destroy_wait_queue(&clp->cl_rpcwaitq); | ||
207 | } | 203 | } |
204 | #else | ||
205 | static void nfs4_shutdown_client(struct nfs_client *clp) | ||
206 | { | ||
207 | } | ||
208 | #endif /* CONFIG_NFS_V4 */ | ||
208 | 209 | ||
209 | /* | 210 | /* |
210 | * Destroy a shared client record | 211 | * Destroy a shared client record |
@@ -213,7 +214,6 @@ static void nfs_free_client(struct nfs_client *clp) | |||
213 | { | 214 | { |
214 | dprintk("--> nfs_free_client(%u)\n", clp->rpc_ops->version); | 215 | dprintk("--> nfs_free_client(%u)\n", clp->rpc_ops->version); |
215 | 216 | ||
216 | nfs4_clear_client_minor_version(clp); | ||
217 | nfs4_shutdown_client(clp); | 217 | nfs4_shutdown_client(clp); |
218 | 218 | ||
219 | nfs_fscache_release_client_cookie(clp); | 219 | nfs_fscache_release_client_cookie(clp); |