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>
This commit is contained in:
parent
01c9a0bc60
commit
ea00528126
1 changed files with 9 additions and 13 deletions
|
@ -170,21 +170,17 @@ error_0:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NFS_V4
|
#ifdef CONFIG_NFS_V4
|
||||||
/*
|
|
||||||
* Clears/puts all minor version specific parts from an nfs_client struct
|
|
||||||
* reverting it to minorversion 0.
|
|
||||||
*/
|
|
||||||
static void nfs4_clear_client_minor_version(struct nfs_client *clp)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_NFS_V4_1
|
#ifdef CONFIG_NFS_V4_1
|
||||||
if (nfs4_has_session(clp)) {
|
static void nfs4_shutdown_session(struct nfs_client *clp)
|
||||||
|
{
|
||||||
|
if (nfs4_has_session(clp))
|
||||||
nfs4_destroy_session(clp->cl_session);
|
nfs4_destroy_session(clp->cl_session);
|
||||||
clp->cl_session = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
clp->cl_mvops = nfs_v4_minor_ops[0];
|
|
||||||
#endif /* CONFIG_NFS_V4_1 */
|
|
||||||
}
|
}
|
||||||
|
#else /* CONFIG_NFS_V4_1 */
|
||||||
|
static void nfs4_shutdown_session(struct nfs_client *clp)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_NFS_V4_1 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Destroy the NFS4 callback service
|
* Destroy the NFS4 callback service
|
||||||
|
@ -199,7 +195,7 @@ static void nfs4_shutdown_client(struct nfs_client *clp)
|
||||||
{
|
{
|
||||||
if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state))
|
if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state))
|
||||||
nfs4_kill_renewd(clp);
|
nfs4_kill_renewd(clp);
|
||||||
nfs4_clear_client_minor_version(clp);
|
nfs4_shutdown_session(clp);
|
||||||
nfs4_destroy_callback(clp);
|
nfs4_destroy_callback(clp);
|
||||||
if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state))
|
if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state))
|
||||||
nfs_idmap_delete(clp);
|
nfs_idmap_delete(clp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue