summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-04-15 09:29:22 +0100
committerAndy Green <andy.green@linaro.org>2011-04-15 09:29:22 +0100
commitcaa70ccf8cc719acb0540b558b4e075796778db8 (patch)
treee8173307b04eca62168415be04e7800bdf011f80 /fs/nfsd/nfs4state.c
parent56d667f87e81d15d43f264007322f1179ce1722e (diff)
parent3ec10cd8b526c6b10170c2649002672ee2019e73 (diff)
Merge branch 'linux-linaro-2.6.38-master' into for-ubuntuu2
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 f0e448a512c..96aaaa47fd0 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);
}