Skip to content

Commit

Permalink
NFSv4.1: Don't call nfs4_deviceid_purge_client() unless we're NFSv4.1
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Feb 26, 2012
1 parent abd9669 commit 7df529a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 4 additions & 3 deletions fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
#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)
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions fs/nfs/pnfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 7df529a

Please sign in to comment.