Commit af183028 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd4: don't release nfs4_file with associated delegations

Only release a struct nfs4_file if there are no associated delegations.
Signed-off-by: default avatarAndy Adamson <andros@citi.umich.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fa88b1ad
......@@ -1791,7 +1791,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment