]> www.infradead.org Git - users/dwmw2/linux.git/commit
mm: huge_memory: move file_thp_enabled() into huge_memory.c
authorKefeng Wang <wangkefeng.wang@huawei.com>
Thu, 17 Oct 2024 14:14:56 +0000 (22:14 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:15 +0000 (20:11 -0800)
commit9884efd795cc2f71ef3b7f42df32420b0b7ce34f
tree2753866911fd969ee9821b80b328dbd642d5bcc1
parent5a90c155defa684f3a21f68c3f8e40c056e6114c
mm: huge_memory: move file_thp_enabled() into huge_memory.c

file_thp_enabled() is only used in __thp_vma_allowable_orders(), so move
it into huge_memory.c, also check READ_ONLY_THP_FOR_FS ahead to avoid
unnecessary code if config disabled.

Link: https://lkml.kernel.org/r/20241017141457.1169092-1-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/huge_mm.h
mm/huge_memory.c