In msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED and

SLOT_EMPTY deName[0] values. Besides conforming to FAT specification, it
also clears the issue where vfs_hash_insert found the vnode in hash, and
newly allocated vnode is vput()ed. There, deName[0] == 0, and vnode is
not reclaimed, indefinitely kept on mountlist.

Tested by:	pho
MFC after:	3 weeks
This commit is contained in:
Konstantin Belousov 2010-02-28 17:10:41 +00:00
parent 2e45cc5bf6
commit 740a720142
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204468

View File

@ -593,7 +593,7 @@ msdosfs_inactive(ap)
/*
* Ignore denodes related to stale file handles.
*/
if (dep->de_Name[0] == SLOT_DELETED)
if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY)
goto out;
/*
@ -621,7 +621,7 @@ msdosfs_inactive(ap)
printf("msdosfs_inactive(): v_usecount %d, de_Name[0] %x\n",
vrefcnt(vp), dep->de_Name[0]);
#endif
if (dep->de_Name[0] == SLOT_DELETED)
if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY)
vrecycle(vp, td);
return (error);
}