]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
nfs41: Release backchannel resources associated with session
authorAndy Adamson <andros@netapp.com>
Wed, 1 Apr 2009 13:23:18 +0000 (09:23 -0400)
committerBenny Halevy <bhalevy@panasas.com>
Wed, 17 Jun 2009 21:11:34 +0000 (14:11 -0700)
Frees the preallocated backchannel resources that are associated with
this session when the session is destroyed.

A backchannel is currently created once per session. Destroy the backchannel
only when the session is destroyed.

Signed-off-by: Ricardo Labiaga <ricardo.labiaga@netapp.com>
Signed-off-by: Andy Adamson<andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
fs/nfs/nfs4proc.c
fs/nfs/super.c

index 4213c8814997047a2ad424b230800396cf08d3ee..5da939d577d5092d90615abb19943a18131f4711 100644 (file)
@@ -49,6 +49,7 @@
 #include <linux/namei.h>
 #include <linux/mount.h>
 #include <linux/module.h>
+#include <linux/sunrpc/bc_xprt.h>
 
 #include "nfs4_fs.h"
 #include "delegation.h"
@@ -4481,6 +4482,11 @@ struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp)
 
 void nfs4_destroy_session(struct nfs4_session *session)
 {
+       nfs4_proc_destroy_session(session);
+       dprintk("%s Destroy backchannel for xprt %p\n",
+               __func__, session->clp->cl_rpcclient->cl_xprt);
+       xprt_destroy_backchannel(session->clp->cl_rpcclient->cl_xprt,
+                               NFS41_BC_MIN_CALLBACKS);
        nfs4_destroy_slot_table(session);
        kfree(session);
 }
index 73db6f8c145a9432389abaca19c98bb5db174b16..69804a8245f68836d829c2eb4ab32ab3a17956ac 100644 (file)
@@ -2488,7 +2488,6 @@ static void nfs4_kill_super(struct super_block *sb)
        dprintk("--> %s\n", __func__);
        nfs_super_return_all_delegations(sb);
        kill_anon_super(sb);
-
        nfs4_renewd_prepare_shutdown(server);
        nfs_fscache_release_super_cookie(sb);
        nfs_free_server(server);