linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly
@ 2015-09-16 11:59 Yaowei Bai
  2015-09-16 11:59 ` [PATCH 2/3] mm/oom_kill: introduce is_sysrq_oom helper Yaowei Bai
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Yaowei Bai @ 2015-09-16 11:59 UTC (permalink / raw)
  To: akpm, mgorman, mhocko, rientjes, hannes, vdavydov, oleg, vbabka,
	iamjoonsoo.kim, zhangyanfei
  Cc: linux-mm, linux-kernel

Delete unnecessary if to let inactive_anon_is_low_global return
directly.

No functional changes.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 mm/vmscan.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2d978b2..2785d8e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1866,10 +1866,7 @@ static int inactive_anon_is_low_global(struct zone *zone)
 	active = zone_page_state(zone, NR_ACTIVE_ANON);
 	inactive = zone_page_state(zone, NR_INACTIVE_ANON);
 
-	if (inactive * zone->inactive_ratio < active)
-		return 1;
-
-	return 0;
+	return inactive * zone->inactive_ratio < active;
 }
 
 /**
-- 
1.9.1


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-09-23 16:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 11:59 [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly Yaowei Bai
2015-09-16 11:59 ` [PATCH 2/3] mm/oom_kill: introduce is_sysrq_oom helper Yaowei Bai
2015-09-21 16:18   ` Michal Hocko
2015-09-21 23:02   ` David Rientjes
2015-09-16 12:00 ` [PATCH 3/3] mm/compaction: add an is_via_compact_memory helper function Yaowei Bai
2015-09-21 16:19   ` Michal Hocko
2015-09-21 23:03   ` David Rientjes
2015-09-23 16:42   ` Vlastimil Babka
2015-09-21 16:18 ` [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly Michal Hocko
2015-09-22 13:15   ` Yaowei Bai
2015-09-21 23:01 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).