Esempio n. 1
0
/*
 * Flush remaining data, close the file and free all resources.
 */
void
alq_close(struct alq *alq)
{
    /* Only flush and destroy alq if not already shutting down. */
    if (ald_rem(alq) == 0)
        alq_destroy(alq);
}
/*
 * Flush remaining data, close the file and free all resources.
 */
void
alq_close(struct alq *alq)
{
	/*
	 * If we're already shuting down someone else will flush and close
	 * the vnode.
	 */
	if (ald_rem(alq) != 0)
		return;

	/*
	 * Drain all pending IO.
	 */
	alq_shutdown(alq);

	mtx_destroy(&alq->aq_mtx);
	free(alq->aq_first, M_ALD);
	free(alq->aq_entbuf, M_ALD);
	free(alq, M_ALD);
}
Esempio n. 3
0
/*
 * Flush remaining data, close the file and free all resources.
 */
void
alq_close(struct alq *alq)
{
	/*
	 * If we're already shuting down someone else will flush and close
	 * the vnode.
	 */
	if (ald_rem(alq) != 0)
		return;

	/*
	 * Drain all pending IO.
	 */
	alq_shutdown(alq);

	/* XXX drop module refcnt */

	kfree(alq->aq_first);
	kfree(alq->aq_entbuf);
	kfree(alq);
}