summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authoryamt <yamt@NetBSD.org>2004-03-19 13:53:28 +0000
committeryamt <yamt@NetBSD.org>2004-03-19 13:53:28 +0000
commitaefad8a7e87d027202a05f0fa7642dec7a8603bd (patch)
tree2a5bd8d31c2f0035a4264e49c3b8e5f9ae01e265 /sys
parent0f554e4324c8e6bebf1605cad7049330ddc9bc59 (diff)
nfs_getattrcache: deal with timer wraparound.
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs_subs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 2513b39b470..c60838bd6a2 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_subs.c,v 1.131 2004/03/12 16:52:37 yamt Exp $ */
+/* $NetBSD: nfs_subs.c,v 1.132 2004/03/19 13:53:28 yamt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.131 2004/03/12 16:52:37 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.132 2004/03/19 13:53:28 yamt Exp $");
#include "fs_nfs.h"
#include "opt_nfs.h"
@@ -1760,7 +1760,8 @@ nfs_getattrcache(vp, vaper)
struct nfsnode *np = VTONFS(vp);
struct vattr *vap;
- if ((time.tv_sec - np->n_attrstamp) >= NFS_ATTRTIMEO(np)) {
+ if (np->n_attrstamp == 0 ||
+ (time.tv_sec - np->n_attrstamp) >= NFS_ATTRTIMEO(np)) {
nfsstats.attrcache_misses++;
return (ENOENT);
}