/* We fire the reap timer every group expiry interval so we always have a reaper ready to run. This makes shutdown and flushing of the reaper easy to do. Hence we need to keep when the next reap must occur so we can determine at each interval whether there is anything we need to do.  */
STATIC void _xfs_mru_cache_reap(struct work_struct *work)
/* We fire the reap timer every group expiry interval so we always have a reaper ready to run. This makes shutdown and flushing of the reaper easy to do. Hence we need to keep when the next reap must occur so we can determine at each interval whether there is anything we need to do.  */
STATIC void _xfs_mru_cache_reap(struct work_struct *work)
{
	xfs_mru_cache_t		*mru = container_of(work, xfs_mru_cache_t, work.work);
	unsigned long		now, next;
	ASSERT(mru && mru->lists);
	if (!mru || !mru->lists)
		return;
	spin_lock(&mru->lock);
	next = _xfs_mru_cache_migrate(mru, jiffies);
	_xfs_mru_cache_clear_reap_list(mru);
	mru->queued = next;
	if ((mru->queued > 0)) {
		now = jiffies;
		if (next <= now)
			next = 0;
		else
			next -= now;
		queue_delayed_work(xfs_mru_reap_wq, &mru->work, next);
	}
	spin_unlock(&mru->lock);
}