diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-10-13 15:12:59 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-10-17 17:33:57 -0400 |
commit | d29b20cd589128a599e5045d4effc2d7dbc388f5 (patch) | |
tree | 48794b614b23f4159f2edeef484b1ff9c93ffbd7 /fs/nfsd/xdr4.h | |
parent | bcf130f9dfbaccf91376a44b18f51ed8007840d6 (diff) |
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>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r-- | fs/nfsd/xdr4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h index 4c8a7ec3f25d..32e6fd8d9768 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h | |||
@@ -554,6 +554,7 @@ extern __be32 nfsd4_process_open1(struct nfsd4_compound_state *, | |||
554 | struct nfsd4_open *open); | 554 | struct nfsd4_open *open); |
555 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, | 555 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, |
556 | struct svc_fh *current_fh, struct nfsd4_open *open); | 556 | struct svc_fh *current_fh, struct nfsd4_open *open); |
557 | extern void nfsd4_cleanup_open_state(struct nfsd4_open *open, __be32 status); | ||
557 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, | 558 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, |
558 | struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc); | 559 | struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc); |
559 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, | 560 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, |