/* Call xfs_mru_cache_flush() to flush out all cached entries, calling their free functions as they're deleted. When this function returns, the caller is guaranteed that all the free functions for all the elements have finished executing and the reaper is not running.  */
void xfs_mru_cache_flush(xfs_mru_cache_t *mru)
/* Call xfs_mru_cache_flush() to flush out all cached entries, calling their free functions as they're deleted. When this function returns, the caller is guaranteed that all the free functions for all the elements have finished executing and the reaper is not running.  */
void xfs_mru_cache_flush(xfs_mru_cache_t *mru)
{
	if (!mru || !mru->lists)
		return;
	spin_lock(&mru->lock);
	if (mru->queued) {
		spin_unlock(&mru->lock);
		cancel_rearming_delayed_workqueue(xfs_mru_reap_wq, &mru->work);
		spin_lock(&mru->lock);
	}
	_xfs_mru_cache_migrate(mru, jiffies + mru->grp_count * mru->grp_time);
	_xfs_mru_cache_clear_reap_list(mru);
	spin_unlock(&mru->lock);
}