Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm/filemap: avoid type conversion

The return type of function folio_test_hugetlb is bool type, there is no
need to assign it to an integer type.

Link: https://lkml.kernel.org/r/20240108044815.3291487-1-lihongbo22@huawei.com
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Hongbo Li and committed by
Andrew Morton
6212eb4d 9eda317c

+1 -1
+1 -1
mm/filemap.c
··· 843 843 struct folio *folio, pgoff_t index, gfp_t gfp, void **shadowp) 844 844 { 845 845 XA_STATE(xas, &mapping->i_pages, index); 846 - int huge = folio_test_hugetlb(folio); 846 + bool huge = folio_test_hugetlb(folio); 847 847 bool charged = false; 848 848 long nr = 1; 849 849