nfsd4; fix session reference count leak
Note the session has to be put() here regardless of what happens to the
client.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1176708..5a69ee6 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -714,7 +714,6 @@
} else
renew_client_locked(clp);
spin_unlock(&client_lock);
- nfsd4_put_session(session);
}
/* must be called under the client_lock */
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index ac17a70..835924f 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3325,6 +3325,7 @@
}
/* Renew the clientid on success and on replay */
release_session_client(cs->session);
+ nfsd4_put_session(cs->session);
}
return 1;
}