svn commit: r330700 - stable/10/sys/fs/tmpfs

Ed Maste emaste at FreeBSD.org
Fri Mar 9 17:59:23 UTC 2018


Author: emaste
Date: Fri Mar  9 17:59:22 2018
New Revision: 330700
URL: https://svnweb.freebsd.org/changeset/base/330700

Log:
  MFC r285885 by brueffer:
  
  In tmpfs_chtimes(), remove checks on the nanosecond level when
  determining whether a node changed.
  
  Other filesystems, e.g., UFS, only check on seconds, when determining
  whether something changed.
  
  This also corrects the birthtime case, where we checked tv_nsec
  twice, instead of tv_sec and tv_nsec (PR).
  
  PR:		201284

Modified:
  stable/10/sys/fs/tmpfs/tmpfs_subr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c
==============================================================================
--- stable/10/sys/fs/tmpfs/tmpfs_subr.c	Fri Mar  9 17:54:14 2018	(r330699)
+++ stable/10/sys/fs/tmpfs/tmpfs_subr.c	Fri Mar  9 17:59:22 2018	(r330700)
@@ -1740,20 +1740,18 @@ tmpfs_chtimes(struct vnode *vp, struct vattr *vap,
 	if (error != 0)
 		return (error);
 
-	if (vap->va_atime.tv_sec != VNOVAL && vap->va_atime.tv_nsec != VNOVAL)
+	if (vap->va_atime.tv_sec != VNOVAL)
 		node->tn_status |= TMPFS_NODE_ACCESSED;
 
-	if (vap->va_mtime.tv_sec != VNOVAL && vap->va_mtime.tv_nsec != VNOVAL)
+	if (vap->va_mtime.tv_sec != VNOVAL)
 		node->tn_status |= TMPFS_NODE_MODIFIED;
 
-	if (vap->va_birthtime.tv_nsec != VNOVAL &&
-	    vap->va_birthtime.tv_nsec != VNOVAL)
+	if (vap->va_birthtime.tv_sec != VNOVAL)
 		node->tn_status |= TMPFS_NODE_MODIFIED;
 
 	tmpfs_itimes(vp, &vap->va_atime, &vap->va_mtime);
 
-	if (vap->va_birthtime.tv_nsec != VNOVAL &&
-	    vap->va_birthtime.tv_nsec != VNOVAL)
+	if (vap->va_birthtime.tv_sec != VNOVAL)
 		node->tn_birthtime = vap->va_birthtime;
 	ASSERT_VOP_ELOCKED(vp, "chtimes2");
 


More information about the svn-src-stable mailing list