Commit ebd6c707 authored by Tejun Heo's avatar Tejun Heo Committed by Linus Torvalds

nfsd: convert to idr_alloc()

idr_get_new*() and friends are about to be deprecated.  Convert to the
new idr_alloc() interface.

Only compile-tested.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Tested-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 801cb2d6
...@@ -242,9 +242,8 @@ kmem_cache *slab) ...@@ -242,9 +242,8 @@ kmem_cache *slab)
if (!stid) if (!stid)
return NULL; return NULL;
if (!idr_pre_get(stateids, GFP_KERNEL)) new_id = idr_alloc(stateids, stid, min_stateid, 0, GFP_KERNEL);
goto out_free; if (new_id < 0)
if (idr_get_new_above(stateids, stid, min_stateid, &new_id))
goto out_free; goto out_free;
stid->sc_client = cl; stid->sc_client = cl;
stid->sc_type = 0; stid->sc_type = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment