summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust2012-02-26 23:34:22 +0100
committerTrond Myklebust2012-02-26 23:34:22 +0100
commit7df529af5fb4b4064f8cd62629e259ac79c0b4ca (patch)
treeca2995f28fb5c487926d88d6a9f2fb710667dca9 /fs
parentNFS: Ensure struct nfs_client holds a reference to the net namespace (diff)
downloadkernel-qcow2-linux-7df529af5fb4b4064f8cd62629e259ac79c0b4ca.tar.gz
kernel-qcow2-linux-7df529af5fb4b4064f8cd62629e259ac79c0b4ca.tar.xz
kernel-qcow2-linux-7df529af5fb4b4064f8cd62629e259ac79c0b4ca.zip
NFSv4.1: Don't call nfs4_deviceid_purge_client() unless we're NFSv4.1
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/client.c7
-rw-r--r--fs/nfs/pnfs.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 8563585cccec..592b5583aa3a 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -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);
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 53d593a0a4f2..8088d51f495e 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -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 */