FreeBSD/sys/fs/unionfs/union_subr.c
/*
 * Get the unionfs node status.
 * You need exclusive lock this vnode.
 */
Get the unionfs node status.
You need exclusive lock this vnode.
Get the unionfs node status . You need exclusive lock this vnode .
void
unionfs_get_node_status(struct unionfs_node *unp, struct thread *td,
			struct unionfs_node_status **unspp)
{
	struct unionfs_node_status *unsp;
	pid_t pid = td->td_proc->p_pid;
	KASSERT(NULL != unspp, ("null pointer"));
	ASSERT_VOP_ELOCKED(UNIONFSTOV(unp), "unionfs_get_node_status");
	LIST_FOREACH(unsp, &(unp->un_unshead), uns_list) {
		if (unsp->uns_pid == pid) {
			*unspp = unsp;
			return;
		}
	}
	unsp = malloc(sizeof(struct unionfs_node_status),
	    M_TEMP, M_WAITOK | M_ZERO);
	unsp->uns_pid = pid;
	LIST_INSERT_HEAD(&(unp->un_unshead), unsp, uns_list);
	*unspp = unsp;
}
void unionfs_get_node_status ( struct unionfs_node * unp , struct thread * td , struct unionfs_node_status * * unspp ) { struct unionfs_node_status * unsp ; pid_t pid = td -> td_proc -> p_pid ; KASSERT ( NULL != unspp , ( " " ) ) ; ASSERT_VOP_ELOCKED ( UNIONFSTOV ( unp ) , " " ) ; LIST_FOREACH ( unsp , & ( unp -> un_unshead ) , uns_list ) { if ( unsp -> uns_pid == pid ) { * unspp = unsp ; return ; } } unsp = malloc ( sizeof ( struct unionfs_node_status ) , M_TEMP , M_WAITOK | M_ZERO ) ; unsp -> uns_pid = pid ; LIST_INSERT_HEAD ( & ( unp -> un_unshead ) , unsp , uns_list ) ; * unspp = unsp ; }
Get the unionfs node status.
Get the unionfs node status .
/* create a new unionfs node status */