
From: NeilBrown <neilb@cse.unsw.edu.au>

Only release a struct nfs4_file if there are no associated delegations.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/nfsd/nfs4state.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/nfsd/nfs4state.c~nfsd4-dont-release-nfs4_file-with-associated-delegations fs/nfsd/nfs4state.c
--- 25/fs/nfsd/nfs4state.c~nfsd4-dont-release-nfs4_file-with-associated-delegations	2005-03-07 23:55:27.000000000 -0800
+++ 25-akpm/fs/nfsd/nfs4state.c	2005-03-07 23:55:27.000000000 -0800
@@ -1791,7 +1791,7 @@ nfsd4_process_open2(struct svc_rqst *rqs
 	            stp->st_stateid.si_fileid, stp->st_stateid.si_generation);
 out:
 	/* take the opportunity to clean up unused state */
-	if (fp && list_empty(&fp->fi_perfile))
+	if (fp && list_empty(&fp->fi_perfile) && list_empty(&fp->fi_del_perfile))
 		release_file(fp);
 
 	/* CLAIM_PREVIOUS has different error returns */
_
