VFS messaging/interfacing work stage 7g/99: More firming up of stage 7.
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 7 Oct 2004 10:03:06 +0000 (10:03 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 7 Oct 2004 10:03:06 +0000 (10:03 +0000)
commit67773eb34698b6f707ff9980d7f2d8677ebb673c
tree6a2952cca9391c06325a6989c1764feb5801043b
parentb8997912a701f8b228466a16d61d07a42e66bd32
VFS messaging/interfacing work stage 7g/99: More firming up of stage 7.

Fix a serious bug in cache_lookup().  The original lookup code could get
away with returning an unreferenced vnode but the new code's cache_hold()/
cache_drop() and related functions can interact badly with an unreferenced
vnode.  So make cache_lookup() return a referenced vnode.

Detect and handle locking races in cache_nlookup() and cache_lookup().

Change cache_zap() to require a locked namecache record so it doesn't
rip data out from under cache_lookup()/cache_nlookup()/cache_resolve().
sys/kern/vfs_cache.c
sys/kern/vfs_default.c
sys/kern/vfs_nlookup.c
sys/vfs/nfs/nfs_vnops.c
sys/vfs/nwfs/nwfs_vnops.c
sys/vfs/smbfs/smbfs_vnops.c