11675 NFSv4 client: Exclusive create should close the file after setattr failure
Review Request #2300 - Created Sept. 13, 2019 and submitted
This adds missing file close into exclusive file create in NFSv4 client in a case the NFS client failed to set file attributes.
I instrumented the NFsv4 client code to add delays to enlarge the race window so I'm able to reproduce the problem reliably. With the fix there are no more files with strange timestamps nor files named .nfsXXXX left at the server when the exclusive create fails to set file attributes.
Review request changed
Status: Closed (submitted)
commit 20f5f9633a7f7a00734c4c03c7c12016e6935b05 Author: Marcel Telka <email@example.com> AuthorDate: Fri Sep 13 07:37:39 2019 +0200 Commit: Dan McDonald <firstname.lastname@example.org> CommitDate: Mon Sep 23 14:10:00 2019 -0400 11675 NFSv4 client: Exclusive create should close the file after setattr failure Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com> Reviewed by: Rich Lowe <email@example.com> Reviewed by: Jan Schlien <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com> :100644 100644 4112cbee05 9f4099c3f8 M usr/src/uts/common/fs/nfs/nfs4_vnops.c