]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: shmem: move shmem_huge_global_enabled() into shmem_allowable_huge_orders()
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Mon, 22 Jul 2024 05:43:19 +0000 (13:43 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:52:23 +0000 (17:52 -0700)
commitacf77212b6fe28adc46f248b66597fbddc22a05e
tree3e30012c94e93f6324f14325588030a283af0e1d
parentf9aa63a5b214c7e4bf02981f4b3a7d5b229cf207
mm: shmem: move shmem_huge_global_enabled() into shmem_allowable_huge_orders()

Move shmem_huge_global_enabled() into shmem_allowable_huge_orders(), so
that shmem_allowable_huge_orders() can also help to find the allowable
huge orders for tmpfs.  Moreover the shmem_huge_global_enabled() can
become static.  While we are at it, passing the vma instead of mm for
shmem_huge_global_enabled() makes code cleaner.

No functional changes.

Link: https://lkml.kernel.org/r/8e825146bb29ee1a1c7bd64d2968ff3e19be7815.1721626645.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Barry Song <21cnbao@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Lance Yang <ioworker0@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/shmem_fs.h
mm/huge_memory.c
mm/shmem.c