summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2013-04-12 15:37:54 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-04-12 15:37:54 +1000
commitefaadb89bfb65e10027b2e330b2edf9e4c3e36dc (patch)
tree893ef3c707d92edded173fe29ba92d6fcb15a795 /fs/nfsd/nfs4state.c
parent8aca60ef32d0ec6da54f92b4f545d86c4c5d129a (diff)
parent70035331f72709835ff0cb69c8b4e9719b57e63e (diff)
Merge branch 'akpm/master'
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index add9721ab059..e65395bf154c 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -326,7 +326,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;
@@ -334,7 +333,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;
@@ -353,10 +352,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:
kmem_cache_free(slab, stid);