[pnfs] [PATCH 01/11] nfs41: remove redundant destroy_session parameter

andros at netapp.com andros at netapp.com
Fri Jul 11 10:39:08 EDT 2008


From: Andy Adamson <andros at netapp.com>

Signed-off-by: Andy Adamson<andros at netapp.com>
---
 fs/nfs/nfs41_session_recovery.c |    2 +-
 fs/nfs/nfs4_fs.h                |    2 +-
 fs/nfs/nfs4proc.c               |    7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/nfs41_session_recovery.c b/fs/nfs/nfs41_session_recovery.c
index c934ac6..9d4041a 100644
--- a/fs/nfs/nfs41_session_recovery.c
+++ b/fs/nfs/nfs41_session_recovery.c
@@ -55,7 +55,7 @@ static int nfs41_start_session_recovery(struct nfs4_session *session)
 static void nfs41_reset_put_session(struct nfs4_session *session)
 {
 	if (atomic_dec_and_test(&session->ref_count))
-		nfs4_proc_destroy_session(session, session->clnt);
+		nfs4_proc_destroy_session(session);
 }
 
 static void nfs41_reset_init_session(struct nfs4_session *session)
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index bf9e3e3..55f62df 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -212,7 +212,7 @@ extern void nfs4_put_session(struct nfs4_session **session);
 extern struct nfs4_session *nfs4_alloc_session(void);
 extern int nfs4_proc_create_session(struct nfs_client *, struct nfs4_session *,
 				    int reset);
-extern int nfs4_proc_destroy_session(struct nfs4_session *, struct rpc_clnt *);
+extern int nfs4_proc_destroy_session(struct nfs4_session *);
 #endif /* CONFIG_NFS_V4_1 */
 
 extern struct nfs4_state_maintenance_ops *nfs4_state_renewal_ops[];
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 00c65c9..560be00 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4613,6 +4613,7 @@ static int nfs4_init_channel(struct nfs4_channel *channel)
 struct nfs4_session *nfs4_alloc_session(void)
 {
 	struct nfs4_session *session;
+
 	session = kzalloc(sizeof(struct nfs4_session), GFP_ATOMIC);
 	if (!session)
 		return NULL;
@@ -4635,7 +4636,7 @@ void nfs4_put_session(struct nfs4_session **session)
 {
 	dprintk("--> nfs4_put_session()\n");
 	if (atomic_dec_and_test(&((*session)->ref_count))) {
-		nfs4_proc_destroy_session(*session, (*session)->clnt);
+		nfs4_proc_destroy_session(*session);
 		nfs4_destroy_slot_table(&((*session)->fore_channel));
 		nfs4_free_session(*session);
 		*session = NULL;
@@ -4802,7 +4803,7 @@ out:
  * Issue the over-the-wire RPC DESTROY_SESSION.
  * The caller must serialize access to this routine.
  */
-int nfs4_proc_destroy_session(struct nfs4_session *session, struct rpc_clnt *clnt)
+int nfs4_proc_destroy_session(struct nfs4_session *session)
 {
 	int status = 0;
 	struct rpc_message msg;
@@ -4814,7 +4815,7 @@ int nfs4_proc_destroy_session(struct nfs4_session *session, struct rpc_clnt *cln
 	msg.rpc_argp = session;
 	msg.rpc_resp = NULL;
 	msg.rpc_cred = NULL;
-	status = rpc_call_sync(clnt, &msg, 0);
+	status = rpc_call_sync(session->clnt, &msg, 0);
 
 	if (status)
 		printk(KERN_WARNING
-- 
1.5.4.1



More information about the pNFS mailing list