FreeBSD/sys/fs/msdosfs/msdosfs_denode.c
/*
 * Move a denode to its correct hash queue after the file it represents has
 * been moved to a new directory.
 */
Move a denode to its correct hash queue after the file it represents has
been moved to a new directory.
Move a denode to its correct hash queue after the file it represents has been moved to a new directory .
void
reinsert(struct denode *dep)
{
	struct vnode *vp;
#if 0
	if (dep->de_Attributes & ATTR_DIRECTORY)
		return;
#endif
	vp = DETOV(dep);
	dep->de_inode = (uint64_t)dep->de_pmp->pm_bpcluster * dep->de_dirclust +
	    dep->de_diroffset;
	vfs_hash_rehash(vp, dep->de_inode);
}
void reinsert ( struct denode * dep ) { struct vnode * vp ; #if 0 if ( dep -> de_Attributes & ATTR_DIRECTORY ) return ; #endif vp = DETOV ( dep ) ; dep -> de_inode = ( uint64_t ) dep -> de_pmp -> pm_bpcluster * dep -> de_dirclust + dep -> de_diroffset ; vfs_hash_rehash ( vp , dep -> de_inode ) ; }
Move a denode to its correct hash queue after the file it represents has
 been moved to a new directory.
Move a denode to its correct hash queue after the file it represents has been moved to a new directory .
/*
	 * Fix up the denode cache.  If the denode is for a directory,
	 * there is nothing to do since the hash is based on the starting
	 * cluster of the directory file and that hasn't changed.  If for a
	 * file the hash is based on the location of the directory entry,
	 * so we must remove it from the cache and re-enter it with the
	 * hash based on the new location of the directory entry.
	 */