diff options
author | John Baldwin <jhb@FreeBSD.org> | 2013-01-16 21:52:31 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2013-01-16 21:52:31 +0000 |
commit | 5055536eec776893db689d02e2c2c40554efc695 (patch) | |
tree | 75492df2923634aba21ae02692e1e117b5db8c34 /sys/nfsclient/nfs_subs.c | |
parent | f7e925398c6cbc952c613f3d1f3e718a8d06a095 (diff) | |
download | src-5055536eec776893db689d02e2c2c40554efc695.tar.gz src-5055536eec776893db689d02e2c2c40554efc695.zip |
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
Notes
Notes:
svn path=/head/; revision=245508
Diffstat (limited to 'sys/nfsclient/nfs_subs.c')
-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 fd83794152ba..372322315549 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); |