diff options
author | Yaowei Bai <bywxiaobai@163.com> | 2015-11-05 21:47:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | 42e2e45777a8c2ec32b6a3c3d81a7d454f6afb6d (patch) | |
tree | 8f2f5d386d295904c6e320a93de1dbeb6de68581 /mm/vmscan.c | |
parent | 80f73b4b71f767f7fcd85f68be18af7795904484 (diff) |
mm/vmscan: make inactive_anon/file_is_low return bool
Make inactive_anon/file_is_low return bool due to these particular
functions only using either one or zero as their return value.
No functional change.
Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 773fc8db75d2..38d04810e0ee 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1859,7 +1859,7 @@ static void shrink_active_list(unsigned long nr_to_scan, | |||
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | #ifdef CONFIG_SWAP | 1861 | #ifdef CONFIG_SWAP |
1862 | static int inactive_anon_is_low_global(struct zone *zone) | 1862 | static bool inactive_anon_is_low_global(struct zone *zone) |
1863 | { | 1863 | { |
1864 | unsigned long active, inactive; | 1864 | unsigned long active, inactive; |
1865 | 1865 | ||
@@ -1876,14 +1876,14 @@ static int inactive_anon_is_low_global(struct zone *zone) | |||
1876 | * Returns true if the zone does not have enough inactive anon pages, | 1876 | * Returns true if the zone does not have enough inactive anon pages, |
1877 | * meaning some active anon pages need to be deactivated. | 1877 | * meaning some active anon pages need to be deactivated. |
1878 | */ | 1878 | */ |
1879 | static int inactive_anon_is_low(struct lruvec *lruvec) | 1879 | static bool inactive_anon_is_low(struct lruvec *lruvec) |
1880 | { | 1880 | { |
1881 | /* | 1881 | /* |
1882 | * If we don't have swap space, anonymous page deactivation | 1882 | * If we don't have swap space, anonymous page deactivation |
1883 | * is pointless. | 1883 | * is pointless. |
1884 | */ | 1884 | */ |
1885 | if (!total_swap_pages) | 1885 | if (!total_swap_pages) |
1886 | return 0; | 1886 | return false; |
1887 | 1887 | ||
1888 | if (!mem_cgroup_disabled()) | 1888 | if (!mem_cgroup_disabled()) |
1889 | return mem_cgroup_inactive_anon_is_low(lruvec); | 1889 | return mem_cgroup_inactive_anon_is_low(lruvec); |
@@ -1891,9 +1891,9 @@ static int inactive_anon_is_low(struct lruvec *lruvec) | |||
1891 | return inactive_anon_is_low_global(lruvec_zone(lruvec)); | 1891 | return inactive_anon_is_low_global(lruvec_zone(lruvec)); |
1892 | } | 1892 | } |
1893 | #else | 1893 | #else |
1894 | static inline int inactive_anon_is_low(struct lruvec *lruvec) | 1894 | static inline bool inactive_anon_is_low(struct lruvec *lruvec) |
1895 | { | 1895 | { |
1896 | return 0; | 1896 | return false; |
1897 | } | 1897 | } |
1898 | #endif | 1898 | #endif |
1899 | 1899 | ||
@@ -1911,7 +1911,7 @@ static inline int inactive_anon_is_low(struct lruvec *lruvec) | |||
1911 | * This uses a different ratio than the anonymous pages, because | 1911 | * This uses a different ratio than the anonymous pages, because |
1912 | * the page cache uses a use-once replacement algorithm. | 1912 | * the page cache uses a use-once replacement algorithm. |
1913 | */ | 1913 | */ |
1914 | static int inactive_file_is_low(struct lruvec *lruvec) | 1914 | static bool inactive_file_is_low(struct lruvec *lruvec) |
1915 | { | 1915 | { |
1916 | unsigned long inactive; | 1916 | unsigned long inactive; |
1917 | unsigned long active; | 1917 | unsigned long active; |
@@ -1922,7 +1922,7 @@ static int inactive_file_is_low(struct lruvec *lruvec) | |||
1922 | return active > inactive; | 1922 | return active > inactive; |
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | static int inactive_list_is_low(struct lruvec *lruvec, enum lru_list lru) | 1925 | static bool inactive_list_is_low(struct lruvec *lruvec, enum lru_list lru) |
1926 | { | 1926 | { |
1927 | if (is_file_lru(lru)) | 1927 | if (is_file_lru(lru)) |
1928 | return inactive_file_is_low(lruvec); | 1928 | return inactive_file_is_low(lruvec); |