Baolin Wang 0bedf001e3 mm: shmem: simplify the suitable huge orders validation for tmpfs
Patch series "Some cleanups for shmem", v3.

This series does some cleanups to reuse code, rename functions and
simplify logic to make code more clear.  No functional changes are
expected.


This patch (of 3):

Move the suitable huge orders validation into shmem_suitable_orders() for
tmpfs, which can reuse some code to simplify the logic.

In addition, we don't have special handling for the error code -E2BIG when
checking for conflicts with PMD sized THP in the pagecache for tmpfs,
instead, it will just fallback to order-0 allocations like this patch
does, so this simplification will not add functional changes.

Link: https://lkml.kernel.org/r/cover.1721626645.git.baolin.wang@linux.alibaba.com
Link: https://lkml.kernel.org/r/965985dd6d322929d78a0beee0dafa1c2a1b81e2.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>
2024-09-01 20:25:44 -07:00
..
2024-07-10 12:14:54 -07:00
2024-07-03 19:29:59 -07:00
2024-07-12 15:52:19 -07:00
2023-12-12 10:11:32 +01:00
2023-04-12 17:36:23 -07:00
2024-07-18 14:48:11 -07:00
2022-10-03 14:02:43 -07:00
2024-07-03 19:30:17 -07:00
2024-08-15 22:16:13 -07:00
2024-09-01 20:25:43 -07:00
2024-08-15 22:16:14 -07:00
2024-07-12 15:52:19 -07:00
2024-07-10 12:14:54 -07:00
2024-07-10 12:14:54 -07:00
2024-08-15 22:16:14 -07:00
2023-04-12 17:36:23 -07:00
2024-09-01 20:25:43 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00
2024-07-17 21:08:55 -07:00