From: NeilBrown Only release a struct nfs4_file if there are no associated delegations. Signed-off-by: Andy Adamson Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 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 */ _