lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/vmscan: change return type of is_page_cache_freeable from int to bool
On Tue 28-11-17 10:48:27, Jiang Biao wrote:
> Using bool for the return type of is_page_cache_freeable() should be
> more appropriate.

Does this help to generate a better code or why do we want to change
this at all?

> Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
> ---
> mm/vmscan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index eb2f031..5fe63ed 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -530,7 +530,7 @@ void drop_slab(void)
> drop_slab_node(nid);
> }
>
> -static inline int is_page_cache_freeable(struct page *page)
> +static inline bool is_page_cache_freeable(struct page *page)
> {
> /*
> * A freeable page cache page is referenced only by the caller
> --
> 2.7.4
>

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-11-28 09:05    [W:0.065 / U:6.232 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site