]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: clean up open owners on OPEN failure
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 13 Oct 2011 19:12:59 +0000 (15:12 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 17 Oct 2011 21:33:57 +0000 (17:33 -0400)
commitcaf56849a44ebcaf4b86a1ee8aa62bd95a084496
tree48794b614b23f4159f2edeef484b1ff9c93ffbd7
parentf5d73b1dbeae905dc00d7a55c34ae5c95a1f6c22
nfsd4: clean up open owners on OPEN failure

If process_open1() creates a new open owner, but the open later fails,
the current code will leave the open owner around.  It won't be on the
close_lru list, and the client isn't expected to send a CLOSE, so it
will hang around as long as the client does.

Similarly, if process_open1() removes an existing open owner from the
close lru, anticipating that an open owner that previously had no
associated stateid's now will, but the open subsequently fails, then
we'll again be left with the same leak.

Fix both problems.

Reported-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h
fs/nfsd/xdr4.h