aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-01-05 21:04:29 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-01-06 14:46:24 -0500
commitea00528126a701845d7c445e725b271940381e3d (patch)
treecb1cb70562b74422b1cc05ee97302b1231446352 /fs/nfs/client.c
parent01c9a0bc60507af7f28cb9138a81836de4528199 (diff)
NFS do not clear minor version at nfs_client free
Resetting the client minor version operations causes nfs4_destroy_callback to fail to shutdown the NFSv4.1 callback service. There is no reason to reset the client minorversion operations when the nfs_client struct is being freed. Remove the minorverion reset and rename the function. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 0870d0d4efc0..855add62abc1 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -170,21 +170,17 @@ error_0:
170} 170}
171 171
172#ifdef CONFIG_NFS_V4 172#ifdef CONFIG_NFS_V4
173/*
174 * Clears/puts all minor version specific parts from an nfs_client struct
175 * reverting it to minorversion 0.
176 */
177static void nfs4_clear_client_minor_version(struct nfs_client *clp)
178{
179#ifdef CONFIG_NFS_V4_1 173#ifdef CONFIG_NFS_V4_1
180 if (nfs4_has_session(clp)) { 174static void nfs4_shutdown_session(struct nfs_client *clp)
175{
176 if (nfs4_has_session(clp))
181 nfs4_destroy_session(clp->cl_session); 177 nfs4_destroy_session(clp->cl_session);
182 clp->cl_session = NULL;
183 }
184
185 clp->cl_mvops = nfs_v4_minor_ops[0];
186#endif /* CONFIG_NFS_V4_1 */
187} 178}
179#else /* CONFIG_NFS_V4_1 */
180static void nfs4_shutdown_session(struct nfs_client *clp)
181{
182}
183#endif /* CONFIG_NFS_V4_1 */
188 184
189/* 185/*
190 * Destroy the NFS4 callback service 186 * Destroy the NFS4 callback service
@@ -199,7 +195,7 @@ static void nfs4_shutdown_client(struct nfs_client *clp)
199{ 195{
200 if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state)) 196 if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state))
201 nfs4_kill_renewd(clp); 197 nfs4_kill_renewd(clp);
202 nfs4_clear_client_minor_version(clp); 198 nfs4_shutdown_session(clp);
203 nfs4_destroy_callback(clp); 199 nfs4_destroy_callback(clp);
204 if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state)) 200 if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state))
205 nfs_idmap_delete(clp); 201 nfs_idmap_delete(clp);