FreeBSD/sys/fs/tmpfs/tmpfs_subr.c
/*
 * Frees a directory entry.  It is the caller's responsibility to destroy
 * the node referenced by it if needed.
 *
 * The link count of node is decreased by one to reflect the removal of an
 * object that referenced it.  This only happens if 'node_exists' is true;
 * otherwise the function will not access the node referred to by the
 * directory entry, as it may already have been released from the outside.
 */
Frees a directory entry.  It is the caller's responsibility to destroy
the node referenced by it if needed.

The link count of node is decreased by one to reflect the removal of an
object that referenced it.  This only happens if 'node_exists' is true;
otherwise the function will not access the node referred to by the
directory entry, as it may already have been released from the outside.
Frees a directory entry . It is the caller ' s responsibility to destroy the node referenced by it if needed . The link count of node is decreased by one to reflect the removal of an object that referenced it . This only happens if ' node_exists ' is true ; otherwise the function will not access the node referred to by the directory entry as it may already have been released from the outside .
void
tmpfs_free_dirent(struct tmpfs_mount *tmp, struct tmpfs_dirent *de)
{
	struct tmpfs_node *node;
	node = de->td_node;
	if (node != NULL) {
		MPASS(node->tn_links > 0);
		node->tn_links--;
	}
	if (!tmpfs_dirent_duphead(de) && de->ud.td_name != NULL)
		free(de->ud.td_name, M_TMPFSNAME);
	uma_zfree(tmp->tm_dirent_pool, de);
}
void tmpfs_free_dirent ( struct tmpfs_mount * tmp , struct tmpfs_dirent * de ) { struct tmpfs_node * node ; node = de -> td_node ; if ( node != NULL ) { MPASS ( node -> tn_links > 0 ) ; node -> tn_links -- ; } if ( ! tmpfs_dirent_duphead ( de ) && de -> ud . td_name != NULL ) free ( de -> ud . td_name , M_TMPFSNAME ) ; uma_zfree ( tmp -> tm_dirent_pool , de ) ; }
Frees a directory entry.
Frees a directory entry .