return x + 1; /* Ensure that we never return 0 */
}
-/**
+/*
* global_dirty_limits - background-writeback and dirty-throttling thresholds
*
* Calculate the dirty thresholds based on sysctl parameters
*pdirty = dirty;
}
-/**
+/*
* bdi_dirty_limit - @bdi's share of dirty throttling threshold
*
* Allocate high/low dirty limits to fast/slow devices, in order to prevent
spin_unlock_irq(&mapping->tree_lock);
WARN_ON_ONCE(tagged > WRITEBACK_TAG_BATCH);
cond_resched();
- } while (tagged >= WRITEBACK_TAG_BATCH);
+ /* We check 'start' to handle wrapping when end == ~0UL */
+ } while (tagged >= WRITEBACK_TAG_BATCH && start);
}
EXPORT_SYMBOL(tag_pages_for_writeback);