Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Mar 2018 17:59:22 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r330700 - stable/10/sys/fs/tmpfs
Message-ID:  <201803091759.w29HxM9K018213@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803091759.w29HxM9K018213>