Merge branch 'for-2.6.39' of git://linux-nfs.org/~bfields/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Apr 2011 22:45:17 +0000 (15:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Apr 2011 22:45:17 +0000 (15:45 -0700)
* '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

1  2 
fs/nfsd/nfs4state.c

diff --combined fs/nfsd/nfs4state.c
@@@ -397,10 -397,13 +397,13 @@@ static void unhash_generic_stateid(stru
  
  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);
  }
  
@@@ -3055,7 -3058,7 +3058,7 @@@ check_special_stateids(svc_fh *current_
        if (ONE_STATEID(stateid) && (flags & RD_STATE))
                return nfs_ok;
        else if (locks_in_grace()) {
 -              /* Answer in remaining cases depends on existance of
 +              /* Answer in remaining cases depends on existence of
                 * conflicting state; so we must wait out the grace period. */
                return nfserr_grace;
        } else if (flags & WR_STATE)
@@@ -3675,7 -3678,7 +3678,7 @@@ find_lockstateowner_str(struct inode *i
  /*
   * Alloc a lock owner structure.
   * Called in nfsd4_lock - therefore, OPEN and OPEN_CONFIRM (if needed) has 
 - * occured. 
 + * occurred. 
   *
   * strhashval = lock_ownerstr_hashval 
   */