projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ee6362
)
nfsd4: Fix filp leak
author
OGAWA Hirofumi
<
[email protected]
>
Mon, 18 Apr 2011 15:48:55 +0000
(11:48 -0400)
committer
J. Bruce Fields
<
[email protected]
>
Tue, 19 Apr 2011 21:31:13 +0000
(17:31 -0400)
23fcf2ec93fb8573a653408316af599939ff9a8e
(nfsd4: fix oops on lock failure)
The above patch breaks free path for stp->st_file. If stp was inserted
into sop->so_stateids, we have to free stp->st_file refcount. Because
stp->st_file refcount itself is taken whether or not any refcounts are
taken on the stp->st_file->fi_fds[].
Signed-off-by: OGAWA Hirofumi <
[email protected]
>
Cc:
[email protected]
Signed-off-by: J. Bruce Fields <
[email protected]
>
fs/nfsd/nfs4state.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfs4state.c
b/fs/nfsd/nfs4state.c
index c79a98319e4a218020bf03af370a8291d437f474..4cf04e11c66ca39c80dc6b54b6854842de246826 100644
(file)
--- a/
fs/nfsd/nfs4state.c
+++ b/
fs/nfsd/nfs4state.c
@@
-403,8
+403,8
@@
static void free_generic_stateid(struct nfs4_stateid *stp)
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);
}
+ put_nfs4_file(stp->st_file);
kmem_cache_free(stateid_slab, stp);
}