diff options
author | Tejun Heo <tj@kernel.org> | 2013-03-13 17:59:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-13 18:21:45 -0400 |
commit | ebd6c70714f5eda9cd1b60d23754ffd1d62481f6 (patch) | |
tree | 92c7ea47dedb25badf9dc57797acc4b99900064f | |
parent | 801cb2d62d5f673ac671c01397956d8b77a5215b (diff) |
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: Tejun Heo <tj@kernel.org>
Acked-by: J. Bruce Fields <bfields@redhat.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/nfsd/nfs4state.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index d91d6dbf698a..2e27430b9070 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -242,9 +242,8 @@ kmem_cache *slab) | |||
242 | if (!stid) | 242 | if (!stid) |
243 | return NULL; | 243 | return NULL; |
244 | 244 | ||
245 | if (!idr_pre_get(stateids, GFP_KERNEL)) | 245 | new_id = idr_alloc(stateids, stid, min_stateid, 0, GFP_KERNEL); |
246 | goto out_free; | 246 | if (new_id < 0) |
247 | if (idr_get_new_above(stateids, stid, min_stateid, &new_id)) | ||
248 | goto out_free; | 247 | goto out_free; |
249 | stid->sc_client = cl; | 248 | stid->sc_client = cl; |
250 | stid->sc_type = 0; | 249 | stid->sc_type = 0; |