When an inode collision occurs a partially initialized vnode will be
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 30 Jul 2007 14:44:56 +0000 (14:44 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 30 Jul 2007 14:44:56 +0000 (14:44 +0000)
commite0ab0dda4467a333f1c9f1d382f74e3d830a5ed9
tree412273d4ff2f2fc4652730a0e0901f0541a0a684
parenta8873631b9b01f71c3530587f7bc00ce78de7b71
When an inode collision occurs a partially initialized vnode will be
destroyed.  Fix several NULL pointer dereferences in msdosfs that could
occur in this case.  Loosely taken from the UFS code.

Inode collision checks were added to DragonFly to close race conditions
in both the creation and termination of a vnode that were found in UFS.
Subsequently other filesystems were found to have the same race conditions.
Because the VM cache is based on filesystem objects and not on physical
disk blocks, such collisions could result in multiple buffers associated
with different vnodes referencing the same physical disk block and I/O
reordering would then cause stale data to be written to disk.

Submitted-by: "Nicolas Thery" <nthery@gmail.com>
sys/vfs/msdosfs/msdosfs_denode.c