diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-01-08 12:48:15 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-21 16:00:02 -0800 |
commit | 6212eb4d7a636bdfe0c11c84aa90db3fb5e6a0ff (patch) | |
tree | 4c16fd961e61fb0ed2a69b6f5e6c8c311cdac033 /mm/filemap.c | |
parent | 9eda317c15ff13be621d219a5de365d1550f41f7 (diff) | |
download | linux-stable-6212eb4d7a636bdfe0c11c84aa90db3fb5e6a0ff.tar.gz linux-stable-6212eb4d7a636bdfe0c11c84aa90db3fb5e6a0ff.tar.bz2 linux-stable-6212eb4d7a636bdfe0c11c84aa90db3fb5e6a0ff.zip |
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>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 750e779c23db..0d7e20edf46f 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; |