summaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-06-20 21:53:41 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-29 17:46:44 +0200
commiteeebf91675421b730448489ebf4720e5c419beec (patch)
tree84287ae7c6afaa29b5139e39c72a2c137f01bbf5 /fs/nfs/client.c
parentNFS: set_pnfs_layoutdriver() from nfs4_proc_fsinfo() (diff)
downloadlinux-eeebf91675421b730448489ebf4720e5c419beec.tar.xz
linux-eeebf91675421b730448489ebf4720e5c419beec.zip
NFS: Use nfs4_destroy_server() to clean up NFS v4
I can use this function to return delegations and unset the pnfs layout driver rather than continuing to do these things in the generic client. With this change, we no longer need an nfs4_kill_super(). Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index e646b14024c1..bf0f896284a8 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -266,6 +266,8 @@ static void pnfs_init_server(struct nfs_server *server)
static void nfs4_destroy_server(struct nfs_server *server)
{
+ nfs_server_return_all_delegations(server);
+ unset_pnfs_layoutdriver(server);
nfs4_purge_state_owners(server);
}
@@ -1137,7 +1139,6 @@ void nfs_free_server(struct nfs_server *server)
dprintk("--> nfs_free_server()\n");
nfs_server_remove_lists(server);
- unset_pnfs_layoutdriver(server);
if (server->destroy != NULL)
server->destroy(server);