Files
lkl_linux/include/linux
Sumanth Korikkar 66aa8b6920 mm/shmem: inline shmem_is_huge() for disabled transparent hugepages
In order to  minimize code size (CONFIG_CC_OPTIMIZE_FOR_SIZE=y),
compiler might choose to make a regular function call (out-of-line) for
shmem_is_huge() instead of inlining it. When transparent hugepages are
disabled (CONFIG_TRANSPARENT_HUGEPAGE=n), it can cause compilation
error.

mm/shmem.c: In function `shmem_getattr':
./include/linux/huge_mm.h:383:27: note: in expansion of macro `BUILD_BUG'
  383 | #define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; })
      |                           ^~~~~~~~~
mm/shmem.c:1148:33: note: in expansion of macro `HPAGE_PMD_SIZE'
 1148 |                 stat->blksize = HPAGE_PMD_SIZE;

To prevent the possible error, always inline shmem_is_huge() when
transparent hugepages are disabled.

Link: https://lkml.kernel.org/r/20240409155407.2322714-1-sumanthk@linux.ibm.com
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 1f737846aa3c45f07a06fa0d018b39e1afb8084a)
2025-06-12 19:55:00 +10:00
..
2022-11-04 12:59:25 +02:00
2023-06-16 12:27:04 -06:00
2023-05-20 19:20:30 +02:00
2019-12-11 09:12:38 +01:00
2023-05-19 23:23:52 +05:30
2023-08-23 08:21:37 +01:00
2022-03-23 19:58:38 +01:00
2022-07-05 20:25:39 +02:00
2023-09-11 15:24:16 -07:00
2010-11-23 20:14:46 +00:00
2022-01-22 08:33:34 +02:00
2021-05-06 19:24:11 -07:00
2021-04-14 16:30:30 +03:00
2020-05-24 20:48:11 +02:00
2023-01-19 14:46:25 +01:00
2023-08-09 08:21:22 +02:00
2023-09-19 16:41:26 -07:00
2023-05-31 13:06:57 +02:00
2023-02-03 08:20:55 -07:00
2021-02-26 09:41:03 -08:00
2018-06-15 18:10:01 -03:00
2023-01-13 11:48:15 +01:00
2023-05-25 09:26:19 +02:00
2024-05-13 09:15:20 +09:00
2023-04-17 18:01:23 +02:00
2023-08-24 16:20:30 -07:00
2023-01-19 16:07:40 +01:00
2020-03-09 11:12:19 +01:00
2023-03-06 15:49:07 -06:00
2019-12-03 11:20:37 +01:00
2023-01-29 15:18:33 -07:00
2023-01-29 15:18:33 -07:00
2021-08-26 15:32:28 -04:00
2018-01-01 12:40:27 -07:00
2023-02-06 19:06:58 +01:00
2023-09-01 00:29:34 +02:00
2021-07-27 11:00:36 +02:00
2023-03-19 10:02:04 -07:00
2020-11-16 16:31:41 +01:00
2021-06-25 19:57:01 -04:00
2020-03-06 11:06:15 +01:00
2019-02-15 16:54:38 +01:00
2023-06-13 16:49:23 +02:00
2022-01-20 08:52:54 +02:00
2021-07-27 20:11:45 +01:00
2021-07-27 20:11:44 +01:00
2010-02-09 11:13:56 +01:00
2023-09-13 10:48:48 +02:00
2023-05-01 17:50:18 -07:00
2020-07-24 17:12:41 -07:00
2022-06-09 21:53:09 -07:00
2023-08-04 11:02:46 +01:00
2019-06-26 13:19:46 -07:00
2020-08-04 21:02:38 -04:00
2022-02-28 23:26:27 -08:00
2022-06-27 06:29:12 -06:00
2022-09-08 12:59:00 -06:00
2022-09-26 13:31:20 +02:00
2018-06-22 13:43:27 +09:00
2020-05-18 10:30:21 +01:00
2023-08-05 08:18:04 -04:00
2023-07-14 13:47:07 -06:00
2024-05-13 09:15:20 +09:00
2019-12-11 09:12:38 +01:00
2022-07-17 17:31:38 -07:00
2021-02-26 09:41:03 -08:00
2023-08-18 10:12:10 -07:00
2022-01-27 13:53:26 +00:00
2023-08-15 14:57:25 -07:00
2020-05-28 10:31:09 +02:00
2022-05-03 16:09:03 -04:00
2019-03-07 18:32:03 -08:00
2023-08-18 10:18:59 -07:00
2022-06-19 10:38:26 +01:00
2020-03-06 11:56:59 +01:00
2022-07-27 14:04:52 +02:00
2023-07-11 14:12:19 -07:00
2023-01-19 09:24:30 +01:00
2022-08-02 12:34:04 -04:00
2021-07-01 11:06:05 -07:00
2023-06-20 20:17:10 -07:00
2023-05-24 18:08:49 +02:00
2018-10-17 13:56:58 -07:00
2019-02-08 15:02:49 -08:00
2018-01-08 08:22:45 -06:00
2022-01-12 10:14:09 -06:00
2020-07-01 10:49:02 +02:00
2022-10-03 17:34:32 -07:00
2022-09-26 19:46:27 -07:00
2021-09-17 13:52:17 +01:00
2023-08-18 10:12:25 -07:00
2023-08-21 14:28:45 -07:00
2023-06-23 16:59:30 -07:00
2021-02-03 19:05:50 +01:00
2022-02-02 07:49:59 -07:00
2017-11-09 10:23:28 +01:00
2021-09-27 17:00:21 +02:00
2021-07-06 10:37:46 -05:00
2022-02-09 08:04:44 +01:00
2023-06-05 09:36:39 +02:00
2023-07-18 10:07:47 +02:00
2019-07-16 19:23:25 -07:00
2023-09-29 17:20:46 -07:00
2023-03-06 09:57:07 +01:00
2022-12-20 03:13:45 +01:00
2023-08-12 09:18:47 -07:00
2019-06-15 12:25:49 +02:00
2022-01-08 12:43:57 -06:00
2018-07-20 01:11:45 +02:00
2022-10-23 18:06:54 -04:00
2023-10-06 11:01:23 +02:00
2023-10-06 11:01:23 +02:00
2023-05-23 12:55:12 -07:00
2022-03-08 14:33:36 -06:00
2023-09-02 15:17:33 -07:00
2023-07-15 11:34:49 -07:00
2023-06-23 16:59:28 -07:00
2023-01-19 15:01:19 +01:00
2023-05-18 19:52:31 -07:00
2023-06-11 18:22:47 +02:00
2020-12-10 16:17:15 +01:00
2022-02-24 15:04:51 +00:00
2023-10-10 19:35:54 -07:00
2023-07-18 10:07:47 +02:00
2018-07-07 17:25:23 +02:00
2023-06-05 09:36:39 +02:00
2023-06-24 15:50:13 -07:00
2022-05-08 01:33:08 -07:00
2021-08-19 09:02:55 +09:00
2021-06-24 15:49:32 +02:00
2022-09-07 12:42:25 +01:00
2023-08-21 13:37:26 -07:00
2024-05-13 09:15:20 +09:00
2022-09-29 15:20:29 +02:00
2022-04-11 19:18:27 -06:00
2018-10-11 09:16:44 -07:00
2023-08-06 08:24:55 +01:00
2020-10-30 21:57:04 +01:00
2023-08-07 17:55:54 +00:00
2023-08-11 21:12:47 +02:00
2023-03-16 13:08:39 -07:00
2020-11-09 18:39:36 +01:00
2021-10-12 11:41:39 -03:00
2022-08-28 16:52:28 +01:00
2005-04-16 15:20:36 -07:00
2023-03-23 17:25:46 +01:00
2023-08-24 13:27:47 -05:00
2023-03-29 08:19:38 +01:00
2023-04-05 20:03:01 -07:00
2023-04-21 03:02:34 -04:00
2021-01-21 14:06:00 -07:00
2023-08-21 14:52:16 +02:00
2021-10-19 23:44:30 +08:00
2022-10-24 12:12:32 -07:00
2023-08-21 13:37:27 -07:00