diff options
author | jhb <jhb@FreeBSD.org> | 2013-01-16 21:52:31 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2013-01-16 21:52:31 +0000 |
commit | ecb4042c11ebefee647476c31655e844f5e32bfe (patch) | |
tree | 75492df2923634aba21ae02692e1e117b5db8c34 /sys/nfsclient | |
parent | fab38d959133fad71c6f3fd4f90d3872e2c7885c (diff) | |
download | FreeBSD-src-ecb4042c11ebefee647476c31655e844f5e32bfe.zip FreeBSD-src-ecb4042c11ebefee647476c31655e844f5e32bfe.tar.gz |
Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes()
instead of comparing the desired time against the current time as a
heuristic.
Reviewed by: rmacklem
MFC after: 1 week
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_subs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index fd83794..3723223 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -1110,7 +1110,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, int full, struct mbuf **mb, *tl = nfs_false; } if (va->va_atime.tv_sec != VNOVAL) { - if (va->va_atime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_atime, tl); @@ -1123,7 +1123,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, int full, struct mbuf **mb, *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (va->va_mtime.tv_sec != VNOVAL) { - if (va->va_mtime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_mtime, tl); |