]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/nfsd/nfs4state.c
Merge branch 'for-greg' of git://gitorious.org/usb/usb into usb-linus
[mv-sheeva.git] / fs / nfsd / nfs4state.c
index 4b36ec3eb8eae69a422a7d235ef3fd930d90014d..aa309aa93fe81be66e5e33c4d404ebec4b815f86 100644 (file)
@@ -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);
 }