]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFS r352678: msdosfs: do not deget unlinked denodes
authorKyle Evans <kevans@FreeBSD.org>
Wed, 25 Sep 2019 17:16:21 +0000 (17:16 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Wed, 25 Sep 2019 17:16:21 +0000 (17:16 +0000)
commitae75ed18ecfa51a1bd3fe9226abd7b54a4b9f39a
tree1c4cc090aed086f51ea1cc76ba7173d530b9f1d0
parent930406df185e96f51827aa60650231a6c6c674b7
MFS r352678: msdosfs: do not deget unlinked denodes

When a file is unlinked, the denode is not reclaimed until the last
reference is dropped, but the directory entry is immediately up for reuse.
This is a problem later when createde goes to grab a denode for the newly
created entry -- we search the hash and find a dead denode, then return that
without even bumping the reference count and the data later gets truncated
when the the last reference to the unlinked file is dropped.

This manifested itself as a broken in-place strip(1) on msdosfs.

The comment indicating that we want to skip these denodes has been updated
to reflect where this is actually done.

Approved by: re (gjb)
sys/fs/msdosfs/msdosfs_denode.c