Author: kib Date: Sat Jan 31 21:31:53 2015 New Revision: 278000 URL: https://svnweb.freebsd.org/changeset/base/278000
Log: Update directory times immediately after an entry is created or removed. Postponing it until tmpfs_getattr() is called causes discordant values reported for file times vs. directory times. Reported and tested by: madpilot Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 31 20:49:30 2015 (r277999) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 31 21:31:53 2015 (r278000) @@ -991,6 +991,7 @@ tmpfs_dir_attach(struct vnode *vp, struc dnode->tn_size += sizeof(struct tmpfs_dirent); dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; + tmpfs_update(vp); } /* @@ -1036,6 +1037,7 @@ tmpfs_dir_detach(struct vnode *vp, struc dnode->tn_size -= sizeof(struct tmpfs_dirent); dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; + tmpfs_update(vp); } void _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"