diff options
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); |