summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_vnops.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2020-09-27 17:25:20 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2020-09-27 17:25:20 +0000
commit65382a3ad8bbce9285fe8c155f0a5958441632c2 (patch)
tree2ff40ae4e0848c706b031f7be00bf6b3213e0799 /sys/nfs/nfs_vnops.c
parent6c963e7cb186d8a3751045cb122da943aff263cd (diff)
In the previous commit, check tv_nsec, not tv_sec as VNOVAL is a
valid valuse of tv_sec but an invalid value for tv_nsec. Noticed by guenther@. ok beck@ deraadt@
Diffstat (limited to 'sys/nfs/nfs_vnops.c')
-rw-r--r--sys/nfs/nfs_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 21d62b8104c..6a5fcd124d4 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.184 2020/09/27 16:40:44 matthieu Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.185 2020/09/27 17:25:19 matthieu Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -1489,9 +1489,9 @@ nfsmout:
}
} else if (info.nmi_v3 && (fmode & O_EXCL)) {
getnanotime(&ts);
- if (vap->va_atime.tv_sec == VNOVAL)
+ if (vap->va_atime.tv_nsec == VNOVAL)
vap->va_atime = ts;
- if (vap->va_mtime.tv_sec == VNOVAL)
+ if (vap->va_mtime.tv_nsec == VNOVAL)
vap->va_mtime = ts;
error = nfs_setattrrpc(newvp, vap, cnp->cn_cred, cnp->cn_proc);
}