[pnfs] [PATCH 04/11] nfs41: separate nfs4_proc_destroy_session and nfs4_put_session
Benny Halevy
bhalevy at panasas.com
Sun Jul 13 07:33:38 EDT 2008
On Jul. 11, 2008, 17:39 +0300, andros at netapp.com wrote:
> From: Andy Adamson <andros at netapp.com>
>
> Signed-off-by: Andy Adamson<andros at netapp.com>
> ---
> fs/nfs/client.c | 1 +
> fs/nfs/nfs4proc.c | 1 -
> 2 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index e4d29f8..252963d 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -889,6 +889,7 @@ void nfs_free_server(struct nfs_server *server)
> * The session must be destroyed before
> * deallocating its structure
> */
> + nfs4_proc_destroy_session(server->session);
> nfs4_put_session(&server->session);
> }
> #endif /* CONFIG_NFS_V4_1 */
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index fe486ea..34ce4b5 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -4635,7 +4635,6 @@ void nfs4_put_session(struct nfs4_session **session)
> {
> dprintk("--> nfs4_put_session()\n");
> if (atomic_dec_and_test(&((*session)->ref_count))) {
That makes me think what the session ref_count is good for...
It's set to 1 initially and in nfs41_reset_init_session and
decremented here.
Benny
> - nfs4_proc_destroy_session(*session);
> nfs4_destroy_slot_table(&((*session)->fore_channel));
> nfs4_free_session(*session);
> *session = NULL;
More information about the pNFS
mailing list