diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-12 00:45:17 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-12 00:45:17 +0200 |
commit | 18770c7c3a0ccd60017ac76b5d2e7d1f71376b94 (patch) | |
tree | 548e113ab83307d25e41ea1e67ace6f53b194798 | |
parent | Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 (diff) | |
parent | nfsd4: fix oops on lock failure (diff) | |
download | linux-18770c7c3a0ccd60017ac76b5d2e7d1f71376b94.tar.xz 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
-rw-r--r-- | fs/nfsd/lockd.c | 1 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c index 0c6d81670137..7c831a2731fa 100644 --- a/fs/nfsd/lockd.c +++ b/fs/nfsd/lockd.c @@ -38,7 +38,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp) exp_readlock(); nfserr = nfsd_open(rqstp, &fh, S_IFREG, NFSD_MAY_LOCK, filp); fh_put(&fh); - rqstp->rq_client = NULL; exp_readunlock(); /* We return nlm error codes as nlm doesn't know * about nfsd, but nfsd does know about nlm.. 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); } |