aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2023-03-15 17:31:03 -0700
committerDarrick J. Wong <djwong@kernel.org>2023-03-19 10:02:04 -0700
commit7ba85fba47bd89618fdb7dc322bdf823b1b56efb (patch)
treeb166f989698ce725884a16b12a34f547c4759745 /kernel/fork.c
parent8b57b11cca88f397035a95b9e12b03511847b0e8 (diff)
downloadlinux-7ba85fba47bd89618fdb7dc322bdf823b1b56efb.tar.gz
fork: remove use of percpu_counter_sum_all
This effectively reverts the change made in commit f689054aace2 ("percpu_counter: add percpu_counter_sum_all interface") as the race condition percpu_counter_sum_all() was invented to avoid is now handled directly in percpu_counter_sum() and nobody needs to care about summing racing with cpu unplug anymore. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index f68954d05e89d..bcc3085e79ef4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -755,11 +755,6 @@ static void check_mm(struct mm_struct *mm)
for (i = 0; i < NR_MM_COUNTERS; i++) {
long x = percpu_counter_sum(&mm->rss_stat[i]);
- if (likely(!x))
- continue;
-
- /* Making sure this is not due to race with CPU offlining. */
- x = percpu_counter_sum_all(&mm->rss_stat[i]);
if (unlikely(x))
pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%ld\n",
mm, resident_page_types[i], x);