mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mm: clean up zone flags
Page reclaim tests zone_is_reclaim_dirty(), but the site that actually sets this state does zone_set_flag(zone, ZONE_TAIL_LRU_DIRTY), sending the reader through layers indirection just to track down a simple bit. Remove all zone flag wrappers and just use bitops against zone->flags directly. It's just as readable and the lines are barely any longer. Also rename ZONE_TAIL_LRU_DIRTY to ZONE_DIRTY to match ZONE_WRITEBACK, and remove the zone_flags_t typedef. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: David Rientjes <[email protected]> Acked-by: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7c809968ff
commit
5705465174
5 changed files with 25 additions and 70 deletions
|
|
@ -631,7 +631,7 @@ long wait_iff_congested(struct zone *zone, int sync, long timeout)
|
|||
* of sleeping on the congestion queue
|
||||
*/
|
||||
if (atomic_read(&nr_bdi_congested[sync]) == 0 ||
|
||||
!zone_is_reclaim_congested(zone)) {
|
||||
!test_bit(ZONE_CONGESTED, &zone->flags)) {
|
||||
cond_resched();
|
||||
|
||||
/* In case we scheduled, work out time remaining */
|
||||
|
|
|
|||
Loading…
Reference in a new issue