Date: Mon, 21 Dec 2015 11:44:54 +0000 (UTC) From: Konstantin Belousov <kib@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: r292540 - stable/10/sys/ufs/ufs Message-ID: <201512211144.tBLBisj0029029@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Dec 21 11:44:54 2015 New Revision: 292540 URL: https://svnweb.freebsd.org/changeset/base/292540 Log: MFC r291936: Update ctime when atime or birthtime are updated. Cleanup setting of ctime/mtime/birthtime. Modified: stable/10/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vnops.c Mon Dec 21 11:24:14 2015 (r292539) +++ stable/10/sys/ufs/ufs/ufs_vnops.c Mon Dec 21 11:44:54 2015 (r292540) @@ -640,19 +640,14 @@ ufs_setattr(ap) error = vn_utimes_perm(vp, vap, cred, td); if (error != 0) return (error); - if (vap->va_atime.tv_sec != VNOVAL) - ip->i_flag |= IN_ACCESS; - if (vap->va_mtime.tv_sec != VNOVAL) - ip->i_flag |= IN_CHANGE | IN_UPDATE; - if (vap->va_birthtime.tv_sec != VNOVAL && - ip->i_ump->um_fstype == UFS2) - ip->i_flag |= IN_MODIFIED; - ufs_itimes(vp); + ip->i_flag |= IN_CHANGE | IN_MODIFIED; if (vap->va_atime.tv_sec != VNOVAL) { + ip->i_flag &= ~IN_ACCESS; DIP_SET(ip, i_atime, vap->va_atime.tv_sec); DIP_SET(ip, i_atimensec, vap->va_atime.tv_nsec); } if (vap->va_mtime.tv_sec != VNOVAL) { + ip->i_flag &= ~IN_UPDATE; DIP_SET(ip, i_mtime, vap->va_mtime.tv_sec); DIP_SET(ip, i_mtimensec, vap->va_mtime.tv_nsec); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512211144.tBLBisj0029029>