svn commit: r204468 - head/sys/fs/msdosfs
Konstantin Belousov
kib at FreeBSD.org
Sun Feb 28 17:10:41 UTC 2010
Author: kib
Date: Sun Feb 28 17:10:41 2010
New Revision: 204468
URL: http://svn.freebsd.org/changeset/base/204468
Log:
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
Modified:
head/sys/fs/msdosfs/msdosfs_denode.c
Modified: head/sys/fs/msdosfs/msdosfs_denode.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:09:09 2010 (r204467)
+++ head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:10:41 2010 (r204468)
@@ -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 @@ out:
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);
}
More information about the svn-src-all
mailing list