From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tejun Heo <tj@kernel.org>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
jackm@dev.mellanox.co.il, ogerlitz@mellanox.com,
roland@purestorage.com, dan.magenheimer@oracle.com,
gregkh@linuxfoundation.org, vjaquez@igalia.com,
rene.sapiens@ti.com, x0095078@ti.com, omar.ramirez@ti.com,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/7] nfsd: convert to idr_alloc()
Date: Tue, 5 Mar 2013 17:31:35 -0500 [thread overview]
Message-ID: <20130305223135.GI15816@fieldses.org> (raw)
In-Reply-To: <1362513772-15174-3-git-send-email-tj@kernel.org>
On Tue, Mar 05, 2013 at 12:02:47PM -0800, Tejun Heo wrote:
> idr_get_new*() and friends are about to be deprecated. Convert to the
> new idr_alloc() interface.
>
> Only compile-tested.
Runs fine too--thanks.
Acked-by: J. Bruce Fields <bfields@redhat.com>
--b.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: "J. Bruce Fields" <bfields@fieldses.org>
> Cc: linux-nfs@vger.kernel.org
> ---
> fs/nfsd/nfs4state.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index d91d6db..2e27430 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -242,9 +242,8 @@ kmem_cache *slab)
> if (!stid)
> return NULL;
>
> - if (!idr_pre_get(stateids, GFP_KERNEL))
> - goto out_free;
> - if (idr_get_new_above(stateids, stid, min_stateid, &new_id))
> + new_id = idr_alloc(stateids, stid, min_stateid, 0, GFP_KERNEL);
> + if (new_id < 0)
> goto out_free;
> stid->sc_client = cl;
> stid->sc_type = 0;
> --
> 1.8.1.4
>
prev parent reply other threads:[~2013-03-05 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1362513772-15174-1-git-send-email-tj@kernel.org>
2013-03-05 20:02 ` [PATCH 1/7] nfsd: remove unused get_new_stid() Tejun Heo
2013-03-05 20:05 ` J. Bruce Fields
2013-03-05 20:02 ` [PATCH 2/7] nfsd: convert to idr_alloc() Tejun Heo
2013-03-05 22:31 ` J. Bruce Fields [this message]
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=20130305223135.GI15816@fieldses.org \
--to=bfields@fieldses.org \
--cc=akpm@linux-foundation.org \
--cc=dan.magenheimer@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=jackm@dev.mellanox.co.il \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=omar.ramirez@ti.com \
--cc=rene.sapiens@ti.com \
--cc=roland@purestorage.com \
--cc=tj@kernel.org \
--cc=vjaquez@igalia.com \
--cc=x0095078@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).