FreeBSD/sys/fs/nfsclient/nfs_clstate.c
/*
 * Find open/lock owners for processes that have exited.
 */
Find open/lock owners for processes that have exited.
Find open / lock owners for processes that have exited .
static void
nfscl_cleanupkext(struct nfsclclient *clp, struct nfscllockownerfhhead *lhp)
{
	struct nfsclowner *owp, *nowp;
	struct nfsclopen *op;
	struct nfscllockowner *lp, *nlp;
	NFSPROCLISTLOCK();
	NFSLOCKCLSTATE();
	LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) {
		LIST_FOREACH(op, &owp->nfsow_open, nfso_list) {
			LIST_FOREACH_SAFE(lp, &op->nfso_lock, nfsl_list, nlp) {
				if (LIST_EMPTY(&lp->nfsl_lock))
					nfscl_emptylockowner(lp, lhp);
			}
		}
		if (nfscl_procdoesntexist(owp->nfsow_owner))
			nfscl_cleanup_common(clp, owp->nfsow_owner);
	}
	NFSUNLOCKCLSTATE();
	NFSPROCLISTUNLOCK();
}
static void nfscl_cleanupkext ( struct nfsclclient * clp , struct nfscllockownerfhhead * lhp ) { struct nfsclowner * owp , * nowp ; struct nfsclopen * op ; struct nfscllockowner * lp , * nlp ; NFSPROCLISTLOCK ( ) ; NFSLOCKCLSTATE ( ) ; LIST_FOREACH_SAFE ( owp , & clp -> nfsc_owner , nfsow_list , nowp ) { LIST_FOREACH ( op , & owp -> nfsow_open , nfso_list ) { LIST_FOREACH_SAFE ( lp , & op -> nfso_lock , nfsl_list , nlp ) { if ( LIST_EMPTY ( & lp -> nfsl_lock ) ) nfscl_emptylockowner ( lp , lhp ) ; } } if ( nfscl_procdoesntexist ( owp -> nfsow_owner ) ) nfscl_cleanup_common ( clp , owp -> nfsow_owner ) ; } NFSUNLOCKCLSTATE ( ) ; NFSPROCLISTUNLOCK ( ) ; }
Find open/lock owners for processes that have exited.
Find open / lock owners for processes that have exited .