Subject: CVS commit: syssrc/sys/kern
To: None <source-changes@netbsd.org>
From: Chuck Silvers <chs@netbsd.org>
List: source-changes
Date: 10/27/2001 07:53:38
Module Name: syssrc
Committed By: chs
Date: Sat Oct 27 04:53:38 UTC 2001
Modified Files:
syssrc/sys/kern: vfs_cache.c
Log Message:
in vfs_lookup(), if we get a cache hit but then fail to vget() the found vnode,
we should not attempt to remove the namecache entry. this is because vget()
can sleep (eg. if VXLOCK is set because the vnode is being reclaimed), and
so multiple threads can end up in this context at the same time.
if this happens, each thread ends up removing the cache entry, but
the code to remove the entry assumes that the entry is still valid.
so we should just leave the (now stale) entry in the cache.
if another thread finds the entry again before it is reused,
that thread will notice that the entry is stale and remove it safely.
fixes PR 14042.
To generate a diff of this commit:
cvs rdiff -r1.30 -r1.31 syssrc/sys/kern/vfs_cache.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.