projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
801cb2d
)
nfsd: convert to idr_alloc()
author
Tejun Heo
<
[email protected]
>
Wed, 13 Mar 2013 21:59:37 +0000
(14:59 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 13 Mar 2013 22:21:45 +0000
(15:21 -0700)
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 <
[email protected]
>
Acked-by: J. Bruce Fields <
[email protected]
>
Tested-by: J. Bruce Fields <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/nfsd/nfs4state.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfs4state.c
b/fs/nfsd/nfs4state.c
index d91d6dbf698a00a57f37207d6a1e10fb86b28d3f..2e27430b9070fc6ca71a56432409b85f465f5d0a 100644
(file)
--- 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;