From: Hongbo Li Date: Mon, 8 Jan 2024 04:48:15 +0000 (+0800) Subject: mm/filemap: avoid type conversion X-Git-Tag: v6.9-rc1~107^2~428 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6212eb4d7a636bdfe0c11c84aa90db3fb5e6a0ff;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton --- diff --git a/mm/filemap.c b/mm/filemap.c index 750e779c23db7..0d7e20edf46f5 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -843,7 +843,7 @@ noinline int __filemap_add_folio(struct address_space *mapping, struct folio *folio, pgoff_t index, gfp_t gfp, void **shadowp) { XA_STATE(xas, &mapping->i_pages, index); - int huge = folio_test_hugetlb(folio); + bool huge = folio_test_hugetlb(folio); bool charged = false; long nr = 1;