public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: andros@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/2] nfs41: fix nfs4_callback_recallslot
Date: Thu, 21 Jan 2010 14:47:22 -0500	[thread overview]
Message-ID: <1264103242.3721.12.camel@localhost> (raw)
In-Reply-To: <1264101557-6619-1-git-send-email-andros@netapp.com>

On Thu, 2010-01-21 at 14:19 -0500, andros@netapp.com wrote: 
> From: Andy Adamson <andros@netapp.com>
> 
> Return NFS4_OK if target high slotid equals enforced high slotid.
> Fix nfs_client reference leak.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/callback_proc.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> index e5155d9..c79e18c 100644
> --- a/fs/nfs/callback_proc.c
> +++ b/fs/nfs/callback_proc.c
> @@ -381,13 +381,17 @@ unsigned nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy)
>  	fc_tbl = &clp->cl_session->fc_slot_table;
>  
>  	status = htonl(NFS4ERR_BAD_HIGH_SLOT);

This is not related directly to your patch, but "sparse" is going to
have a field day with all these scattered around the place. Are there
any plans to clean all this up, and replace those 'int' and 'unsigned'
declarations that are being assigned big ended values with the correct
'__be32' type?

> -	if (args->crsa_target_max_slots >= fc_tbl->max_slots ||
> +	if (args->crsa_target_max_slots > fc_tbl->max_slots ||
>  	    args->crsa_target_max_slots < 1)
> -		goto out;
> +		goto out_putclient;
> +
> +	status = htonl(NFS4_OK);
> +	if (args->crsa_target_max_slots == fc_tbl->max_slots)
> +		goto out_putclient;
>  
>  	fc_tbl->target_max_slots = args->crsa_target_max_slots;
>  	nfs41_handle_recall_slot(clp);
> -	status = htonl(NFS4_OK);
> +out_putclient:
>  	nfs_put_client(clp);	/* balance nfs_find_client */
>  out:
>  	dprintk("%s: exit with status = %d\n", __func__, ntohl(status));



  parent reply	other threads:[~2010-01-21 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 19:19 [PATCH 1/2] nfs41: fix nfs4_callback_recallslot andros
2010-01-21 19:19 ` [PATCH 2/2] nfs41: clear NFS4CLNT_RECALL_SLOT bit on session reset andros
2010-01-21 19:42   ` Trond Myklebust
2010-01-21 19:47     ` William A. (Andy) Adamson
2010-01-21 19:47 ` Trond Myklebust [this message]
2010-01-21 19:58   ` [PATCH 1/2] nfs41: fix nfs4_callback_recallslot William A. (Andy) Adamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1264103242.3721.12.camel@localhost \
    --to=trond.myklebust@netapp.com \
    --cc=andros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox