msdosfs: fix deleted-but-open files handling.
authorNicolas Thery <nthery@gmail.com>
Thu, 26 Feb 2009 06:30:33 +0000 (07:30 +0100)
committerNicolas Thery <nthery@gmail.com>
Thu, 26 Feb 2009 06:30:33 +0000 (07:30 +0100)
commit629f33a733bba046a296b5f1dfa4ef45bc388cb4
tree95d42172cee6b6a18ad2e1af177b3e2111288714
parent2d4cdfafc8fce900fb62864cc36040d7485eb059
msdosfs: fix deleted-but-open files handling.

When deleting a file, msdosfs keeps its denode in the denode cache until it is
reclaimed.  This causes a collision in the cache when recycling the directory
entry of a deleted but still open file for a new or renamed file.  This
collision was incorrecly handled resulting in a kernel panic (rename case) or
syscall error and corrupted in-core state (new file case).

Fix by allowing denodes pointing to the same directory entry to coexist in the
cache as long as a single one of them represents an existing file.

Reported-by: corecore@
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1286>
sys/vfs/msdosfs/msdosfs_denode.c