diff options
| author | wangxuewen <18810879172@163.com> | 2026-05-13 10:52:14 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-06-03 01:22:17 +0300 |
| commit | 12ccf2bef35c4f42f7bf433f7ab699ec103e7f53 (patch) | |
| tree | ebf8e6e0dd3943ce59ce16482f8515d41515515a /include | |
| parent | 0496a59745b0723ea74274db16fd5c8b1379b9a9 (diff) | |
| download | linux-12ccf2bef35c4f42f7bf433f7ab699ec103e7f53.tar.xz | |
mm/shrinker: simplify shrinker_memcg_alloc() using guard()
Use guard(mutex) to automatically handle shrinker_mutex locking and
unlocking in shrinker_memcg_alloc(). This removes the explicit
mutex_unlock() call, the goto-based error path, and the redundant ret
variable, resulting in cleaner and more concise code.
Link: https://lore.kernel.org/20260513075214.2655710-1-18810879172@163.com
Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>
Acked-by: Muchun Song <muchun.song@linux.dev>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Xuewen Wang <wangxuewen@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
