On Sat, 16 Jul 2022, Jeff Layton wrote: > On Wed, 2022-07-06 at 14:18 +1000, NeilBrown wrote: > > > > + fh_fill_pre_attrs(fhp); > > status = nfsd4_vfs_create(fhp, child, open); > > if (status != nfs_ok) > > goto out; > > open->op_created = true; > > + fh_fill_post_attrs(fhp); > > > > /* A newly created file already has a file size of zero. */ > > if ((iap->ia_valid & ATTR_SIZE) && (iap->ia_size == 0)) > > Should the fh_fill_post_attrs call be done after nfsd_create_setattr > instead in this function? It seems like we're filling out the post-op > attr here before we're actually done changing things... nfsd_create_setattr() only affects the newly created thing, so it should not be changing any attributes of the directory that it was created in. So it should not matter for correctness where fh_fill_post_attrs() is called, as long as it is between nfsd4_vfs_create() and inode_unlock(). I preferred closer to the former. Thanks, NeilBrown