mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	tj@kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 4/6] nfsd: convert nfs4_alloc_stid to use idr_alloc_cyclic
Date: Wed, 3 Apr 2013 15:24:29 -0400	[thread overview]
Message-ID: <20130403192429.GI6044@fieldses.org> (raw)
In-Reply-To: <1364412578-7462-5-git-send-email-jlayton@redhat.com>

Err, and ack v2.--b.

On Wed, Mar 27, 2013 at 03:29:36PM -0400, Jeff Layton wrote:
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> Cc: "J. Bruce Fields" <bfields@fieldses.org>
> Cc: linux-nfs@vger.kernel.org
> ---
>  fs/nfsd/nfs4state.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 2e27430..417c848 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -234,7 +234,6 @@ static struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct
>  kmem_cache *slab)
>  {
>  	struct idr *stateids = &cl->cl_stateids;
> -	static int min_stateid = 0;
>  	struct nfs4_stid *stid;
>  	int new_id;
>  
> @@ -242,7 +241,7 @@ kmem_cache *slab)
>  	if (!stid)
>  		return NULL;
>  
> -	new_id = idr_alloc(stateids, stid, min_stateid, 0, GFP_KERNEL);
> +	new_id = idr_alloc_cyclic(stateids, stid, 0, 0, GFP_KERNEL);
>  	if (new_id < 0)
>  		goto out_free;
>  	stid->sc_client = cl;
> @@ -261,10 +260,6 @@ kmem_cache *slab)
>  	 * amount of time until an id is reused, by ensuring they always
>  	 * "increase" (mod INT_MAX):
>  	 */
> -
> -	min_stateid = new_id+1;
> -	if (min_stateid == INT_MAX)
> -		min_stateid = 0;
>  	return stid;
>  out_free:
>  	kfree(stid);
> -- 
> 1.7.11.7
> 

  reply	other threads:[~2013-04-03 19:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 19:29 [PATCH v2 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users Jeff Layton
2013-03-27 19:29 ` [PATCH v2 1/6] idr: introduce idr_alloc_cyclic Jeff Layton
2013-03-27 19:29 ` [PATCH v2 2/6] amso1100: convert to using idr_alloc_cyclic Jeff Layton
2013-03-27 19:35   ` Tejun Heo
2013-03-27 19:29 ` [PATCH v2 3/6] mlx4: " Jeff Layton
2013-03-27 19:29 ` [PATCH v2 4/6] nfsd: convert nfs4_alloc_stid to use idr_alloc_cyclic Jeff Layton
2013-04-03 19:24   ` J. Bruce Fields [this message]
2013-03-27 19:29 ` [PATCH v2 5/6] inotify: convert inotify_add_to_idr " Jeff Layton
2013-03-27 19:29 ` [PATCH v2 6/6] sctp: convert sctp_assoc_set_id " Jeff Layton
2013-03-28 13:53   ` Neil Horman
2013-03-28 14:04     ` Neil Horman
2013-03-31 10:23       ` Jeff Layton
2013-03-27 19:38 ` [PATCH v2 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users Tejun Heo
2013-03-27 19:50   ` Andrew Morton
2013-03-27 19:58     ` Jeff Layton

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=20130403192429.GI6044@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=akpm@linux-foundation.org \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tj@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

all inboxes | Powered by JetHome®