diff options
| author | Qi Zheng <zhengqi.arch@bytedance.com> | 2026-08-17 17:03:27 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 17:38:57 -0700 |
| commit | 948715f5866cc5b91c096a0308dd5a93b1a7d79b (patch) | |
| tree | c7dd1fc63a0f7280e4e9ac52ead9e4ed58aef9cf /include/linux | |
| parent | 877c1d0059ca82eb1e88d1f6c488dec317f7d724 (diff) | |
mm: shmem: move unused huge shrinklist queuing past the truncation check
The shmem_get_folio_gfp() adds the inode to the unused huge shrinker list
at the alloced label, but a subsequent truncation check may still fail and
remove the folio, leaving the inode on the list with a stale folio.
The original code works because the shrinker re-looks-up the folio and
drops stale entries, but it is cleaner to queue the inode only after all
checks that might remove the folio have passed.
So just make the pure structural move with no functional change, and it
serves as preparation for the memcg-aware shrinker conversion.
Link: https://lore.kernel.org/17fcf64faec0dfbbe6cf8a97924e3f39cd3c51a4.1786955972.git.zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
