Commit 8678d1fa authored by Kemeng Shi's avatar Kemeng Shi Committed by Andrew Morton
Browse files

mm: swap: remove stale comment stale comment in cluster_alloc_swap_entry()

As cluster_next_cpu was already dropped, the associated comment is stale
now.

Link: https://lkml.kernel.org/r/20250522122554.12209-5-shikemeng@huaweicloud.com


Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: default avatarKairui Song <kasong@tencent.com>
Reviewed-by: default avatarBaoquan He <bhe@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 152c1339
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -956,9 +956,8 @@ static unsigned long cluster_alloc_swap_entry(struct swap_info_struct *si, int o
	}

	/*
	 * We don't have free cluster but have some clusters in
	 * discarding, do discard now and reclaim them, then
	 * reread cluster_next_cpu since we dropped si->lock
	 * We don't have free cluster but have some clusters in discarding,
	 * do discard now and reclaim them.
	 */
	if ((si->flags & SWP_PAGE_DISCARD) && swap_do_scheduled_discard(si))
		goto new_cluster;