summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2025-03-06 09:31:42 -0500
committerAndrew Morton <akpm@linux-foundation.org>2025-03-17 22:06:58 -0700
commitd9a04a2615c0b8767a42dc26a8c26383e8513cdc (patch)
treea12b571d61e04767a3f0c4ead661af93f7febd14 /mm
parentf0e11a997ab438ce91a7dc9a6dd64c0c4a6af112 (diff)
mm: swap_cgroup: remove double initialization of locals
Fixes: 6769183166b3 ("mm/swap_cgroup: decouple swap cgroup recording and clearing") Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Muchun Song <muchun.song@linux.dev> Cc: Chris Li <chrisl@kernel.org> Cc: Kairui Song <kasong@tencent.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Shakeel Butt <shakeel.butt@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/swap_cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/swap_cgroup.c b/mm/swap_cgroup.c
index 1007c30f12e2..de779fed8c21 100644
--- a/mm/swap_cgroup.c
+++ b/mm/swap_cgroup.c
@@ -92,8 +92,7 @@ void swap_cgroup_record(struct folio *folio, unsigned short id,
*/
unsigned short swap_cgroup_clear(swp_entry_t ent, unsigned int nr_ents)
{
- pgoff_t offset = swp_offset(ent);
- pgoff_t end = offset + nr_ents;
+ pgoff_t offset, end;
struct swap_cgroup *map;
unsigned short old, iter = 0;