Properly vget() vnodes that the syncer intends to VOP_FSYNC(), rather then
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 20 Jan 2005 17:52:03 +0000 (17:52 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 20 Jan 2005 17:52:03 +0000 (17:52 +0000)
commit0e0b62025c6f787288b743ca9c5cdb9b761f2efb
treeadbf9ecaa623f0314cb570aac738fc08833eb491
parent9720784a01954b70ddf7989edd8282f5b2a171b1
Properly vget() vnodes that the syncer intends to VOP_FSYNC(), rather then
just locking the vnode.  The original FreeBSD code allowed a vnode to be
locked without being refd, but DragonFly requires that a vnode be ref'd
if it is going to be locked.  This fixes a rare panic that can occur when
the syncer is flushing a vnode that mainline code tries to access at the
same time.

This also brings the syncer inline with the filesystem sync code which has
been using normal vget()'s for several months now.

Reported-by: David Rhodus
sys/kern/vfs_sync.c