NFSv4.1: Don't call nfs4_deviceid_purge_client() unless we're NFSv4.1
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 26 Feb 2012 22:34:22 +0000 (17:34 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 26 Feb 2012 22:34:22 +0000 (17:34 -0500)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/client.c
fs/nfs/pnfs.h

index 8563585cccec97b0ea9ce0cf60e818147574a055..592b5583aa3af72aa634c8f9a0a189b43ddb1f52 100644 (file)
@@ -204,8 +204,11 @@ error_0:
 #ifdef CONFIG_NFS_V4_1
 static void nfs4_shutdown_session(struct nfs_client *clp)
 {
-       if (nfs4_has_session(clp))
+       if (nfs4_has_session(clp)) {
+               nfs4_deviceid_purge_client(clp);
                nfs4_destroy_session(clp->cl_session);
+       }
+
 }
 #else /* CONFIG_NFS_V4_1 */
 static void nfs4_shutdown_session(struct nfs_client *clp)
@@ -298,8 +301,6 @@ static void nfs_free_client(struct nfs_client *clp)
        if (clp->cl_machine_cred != NULL)
                put_rpccred(clp->cl_machine_cred);
 
-       nfs4_deviceid_purge_client(clp);
-
        put_net(clp->net);
        kfree(clp->cl_hostname);
        kfree(clp->server_scope);
index 53d593a0a4f265a69c9f4fbc5d2ccb759291686a..8088d51f495e477f4f165022a9520d7fac4fd20e 100644 (file)
@@ -426,9 +426,6 @@ static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync)
        return 0;
 }
 
-static inline void nfs4_deviceid_purge_client(struct nfs_client *ncl)
-{
-}
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* FS_NFS_PNFS_H */