aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel
diff options
context:
space:
mode:
authorRoman Gushchin <roman.gushchin@linux.dev>2024-07-26 20:31:10 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-09-01 20:25:51 -0700
commit57979fabff554bf4d1edeeee69251b22ca9bf55e (patch)
tree8a46efc7e788296316151d1142fde163471ae750 /kernel
parentmm: page_counters: put page_counter_calculate_protection() under CONFIG_MEMCG (diff)
downloadwireguard-linux-57979fabff554bf4d1edeeee69251b22ca9bf55e.tar.xz
wireguard-linux-57979fabff554bf4d1edeeee69251b22ca9bf55e.zip
mm: page_counters: initialize usage using ATOMIC_LONG_INIT() macro
When a page_counter structure is initialized, there is no need to use an atomic set operation to initialize the usage counter because at this point the structure is not visible to anybody else. ATOMIC_LONG_INIT() is what should be used in such cases. Link: https://lkml.kernel.org/r/20240726203110.1577216-4-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions