| From df04ed0ce409d36d74fb0961d8c5de647f57611d Mon Sep 17 00:00:00 2001 |
| From: Guenter Roeck <groeck@chromium.org> |
| Date: Fri, 6 Oct 2023 08:41:56 -0700 |
| Subject: [PATCH] FIXUP: CHROMIUM: MGLRU: sysfs notification using a |
| kernfs_node |
| |
| 0-day reports: |
| |
| mm/vmscan.c:194:20: sparse: sparse: symbol 'lru_gen_admin_node' was not declared. Should it be static? |
| |
| lru_gen_admin_node is only used in this file, so declare it static. |
| |
| On top of that, lru_gen_admin_node is only used if CONFIG_LRU_GEN is |
| enabled, meaning the code does not compile with CONFIG_LRU_GEN=n if |
| the variable is declared static. Move it into conditional code |
| to fix that problem. |
| |
| Note: The original commit has no UPSTREAM-TASK, so this one won't get one either. |
| |
| BUG=b:260967742 |
| UPSTREAM-TASK: None |
| TEST=Run through sparse |
| |
| Change-Id: I57d551168bee3d09c7f27377ad2603a7c2685847 |
| Disallow-Recycled-Builds: test-failures |
| Signed-off-by: Guenter Roeck <groeck@chromium.org> |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4917866 |
| Reviewed-by: Suleiman Souhlal <suleiman@google.com> |
| Commit-Queue: Suleiman Souhlal <suleiman@google.com> |
| --- |
| mm/vmscan.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/mm/vmscan.c b/mm/vmscan.c |
| index 1f906cd4a5d3d44fd39162dfc8a3f20060de4929..b0af180c8bbb93b954eed656ccc8760505b8625d 100644 |
| --- a/mm/vmscan.c |
| +++ b/mm/vmscan.c |
| @@ -191,8 +191,6 @@ struct scan_control { |
| */ |
| int vm_swappiness = 60; |
| |
| -struct kernfs_node *lru_gen_admin_node; |
| - |
| #ifdef CONFIG_MEMCG |
| |
| /* Returns true for reclaim through cgroup limits or cgroup interfaces. */ |
| @@ -2541,6 +2539,8 @@ static bool can_age_anon_pages(struct pglist_data *pgdat, |
| |
| #ifdef CONFIG_LRU_GEN |
| |
| +static struct kernfs_node *lru_gen_admin_node; |
| + |
| #ifdef CONFIG_LRU_GEN_ENABLED |
| DEFINE_STATIC_KEY_ARRAY_TRUE(lru_gen_caps, NR_LRU_GEN_CAPS); |
| #define get_cap(cap) static_branch_likely(&lru_gen_caps[cap]) |
| -- |
| 2.43.0.rc2.451.g8631bc7472-goog |
| |