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

View File

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