From 9198a7ff27f0fe85565b4c148a8c26f0208b932a Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 6 Sep 2011 14:50:49 -0400 Subject: [PATCH] --- yaml --- r: 267147 b: refs/heads/master c: 4665e2bac5076d02264f4a4d79edafa05ec7b752 h: refs/heads/master i: 267145: 2f813d8685822302547e74b67aae164ea9658bc2 267143: cd536232c51951176693b32f034a1f6efa6c2074 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 3dfeb6d98fff..1c1ae1ccc556 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe0750e5c43189adb6e6fc59837af7d5a588f413 +refs/heads/master: 4665e2bac5076d02264f4a4d79edafa05ec7b752 diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 567130dccda0..c28432a80210 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -411,7 +411,7 @@ static void unhash_generic_stateid(struct nfs4_stateid *stp) list_del(&stp->st_perstateowner); } -static void free_generic_stateid(struct nfs4_stateid *stp) +static void close_generic_stateid(struct nfs4_stateid *stp) { int i; @@ -420,9 +420,16 @@ static void free_generic_stateid(struct nfs4_stateid *stp) if (test_bit(i, &stp->st_access_bmap)) nfs4_file_put_access(stp->st_file, nfs4_access_to_omode(i)); + __clear_bit(i, &stp->st_access_bmap); } } put_nfs4_file(stp->st_file); + stp->st_file = NULL; +} + +static void free_generic_stateid(struct nfs4_stateid *stp) +{ + close_generic_stateid(stp); kmem_cache_free(stateid_slab, stp); }