diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-01-21 00:00:56 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-01-21 00:00:56 +0000 |
commit | 33e5b8335fac77506c1056d92fa2e9526995b027 (patch) | |
tree | 9dd79d2c52d13503b363a7ff73f1d42d0c3e5067 /sys/kern | |
parent | b24a0490358935cd71e101bee2ac6c31b0da59b6 (diff) |
Make sure cache_revlookup() doesn't return invalid cache entries.
This function will be used in the future. Okay marius@.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 259182ecefb..0af102faea4 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cache.c,v 1.18 2005/06/18 18:09:42 millert Exp $ */ +/* $OpenBSD: vfs_cache.c,v 1.19 2006/01/21 00:00:55 pedro Exp $ */ /* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */ /* @@ -282,7 +282,7 @@ cache_revlookup(struct vnode *vp, struct vnode **dvpp, char **bpp, char *bufp) ncp->nc_vpid == vp->v_id && (dvp = ncp->nc_dvp) != NULL && /* avoid pesky '.' entries.. */ - dvp != vp) { + dvp != vp && ncp->nc_dvpid == dvp->v_id) { #ifdef DIAGNOSTIC if (ncp->nc_nlen == 1 && |