summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-11 15:45:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-11 15:45:17 -0700
commit18770c7c3a0ccd60017ac76b5d2e7d1f71376b94 (patch)
tree548e113ab83307d25e41ea1e67ace6f53b194798 /fs/nfsd/nfs4state.c
parent6b98cd5aad3bb51a3b5b51ba670ab8d5fe1cc487 (diff)
parent23fcf2ec93fb8573a653408316af599939ff9a8e (diff)
downloadblackbird-op-linux-18770c7c3a0ccd60017ac76b5d2e7d1f71376b94.tar.gz
blackbird-op-linux-18770c7c3a0ccd60017ac76b5d2e7d1f71376b94.zip
Merge branch 'for-2.6.39' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.39' of git://linux-nfs.org/~bfields/linux: nfsd4: fix oops on lock failure nfsd: fix auth_domain reference leak on nlm operations
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4b36ec3eb8ea..aa309aa93fe8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -397,10 +397,13 @@ static void unhash_generic_stateid(struct nfs4_stateid *stp)
static void free_generic_stateid(struct nfs4_stateid *stp)
{
- int oflag = nfs4_access_bmap_to_omode(stp);
+ int oflag;
- nfs4_file_put_access(stp->st_file, oflag);
- put_nfs4_file(stp->st_file);
+ if (stp->st_access_bmap) {
+ oflag = nfs4_access_bmap_to_omode(stp);
+ nfs4_file_put_access(stp->st_file, oflag);
+ put_nfs4_file(stp->st_file);
+ }
kmem_cache_free(stateid_slab, stp);
}
OpenPOWER on IntegriCloud