Message ID | 20240529111904.2069608-6-david@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C823C27C44 for <linux-mm@archiver.kernel.org>; Wed, 29 May 2024 11:19:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E5586B0099; Wed, 29 May 2024 07:19:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 66C676B00A4; Wed, 29 May 2024 07:19:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44B066B00A5; Wed, 29 May 2024 07:19:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 201016B0099 for <linux-mm@kvack.org>; Wed, 29 May 2024 07:19:25 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B7C271A0847 for <linux-mm@kvack.org>; Wed, 29 May 2024 11:19:24 +0000 (UTC) X-FDA: 82171187448.07.6E11A44 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id EC9C61C0023 for <linux-mm@kvack.org>; Wed, 29 May 2024 11:19:22 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LAgtLfFl; spf=pass (imf18.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716981563; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=O9wGKMA7pg+ELfK4C46qM4+rq+qnJqY5pRyECiTlobg=; b=J3t+mots/uvGkZP7hGCLLEFOFjunhPEEI4koAP0hnwaIxlFU43SJ41QqYuGfg+o/Ob1F5t nH5hkFWQp2CVjeWUx107qZldUAnKq8RhyuaqH2eFWzIssfcf1Ju7N8ZpJTAEOgMvI/06dN pg6xXmnsZttvVsMXNNP4elx7zyS/bOM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716981563; a=rsa-sha256; cv=none; b=icupTu06p7DaBIKQ1dMUc4pZCOi/yvNf5IgyfNhpgA6sWX97TVqLGwQ6rmpxc5ZseOfSfS xiUv44zvTnSMH47mxhQX3Wl8e5TPhwP9BlVEL2ld9+cGljVnkwtYJx1QbyR4PYZuz1PRbp 2m47W2exmlN3s3sW1sXfNep3an5Py/U= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LAgtLfFl; spf=pass (imf18.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716981562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O9wGKMA7pg+ELfK4C46qM4+rq+qnJqY5pRyECiTlobg=; b=LAgtLfFlfJ/Eofy7ud1asdljqy715pbOXELMxnHRA6EHSC06heT8d86bxcK8VrfYXDS+H1 7JpOCSD+s7SoVfQybS/CAF3YSA/f1YeM5zYNIynIfVWWLl2P/B7hu8sWfvPr7DM91xbACZ Cq4XId8vdGQfQHYoZqoMRGbxu6efQBU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-600-YyUVCmUjPleKjz5PsgrFIg-1; Wed, 29 May 2024 07:19:17 -0400 X-MC-Unique: YyUVCmUjPleKjz5PsgrFIg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6752B3806701; Wed, 29 May 2024 11:19:17 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.193.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA1DAC15BB1; Wed, 29 May 2024 11:19:15 +0000 (UTC) From: David Hildenbrand <david@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Mike Rapoport <rppt@kernel.org>, Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: [PATCH v2 5/6] mm/filemap: reinitialize folio->_mapcount directly Date: Wed, 29 May 2024 13:19:03 +0200 Message-ID: <20240529111904.2069608-6-david@redhat.com> In-Reply-To: <20240529111904.2069608-1-david@redhat.com> References: <20240529111904.2069608-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EC9C61C0023 X-Rspam-User: X-Stat-Signature: fc3kbwbyg3di5pa5ybj6zahf5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Pw5xxYWcwv5j8JFIKeGBPPubbSjc0L6v3XiRBfqg2r78aT+TNqwlcz+6K32odBR1ILV9YkuOhbrjdqY/3uGOzwrabvF/XylpkjmZkENK2QrcnkS9vDpDSKuKJE0GNOT/wvn0e+QFAtiWvSkJPH51KabiP6eNADyFIkkWFaPlS6bXqr45FdL9J8iDXQq8Y4tO8pRbBEApVHMgVXHesXBYMPEM6wWZpq9oMva8kEcehpPN7QKdDa X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: page_type, zsmalloc and page_mapcount_reset()
|
expand
|
diff --git a/mm/filemap.c b/mm/filemap.c index ba06237b942d6..9fe5c02ae92e7 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -177,7 +177,7 @@ static void filemap_unaccount_folio(struct address_space *mapping, * and we'd rather not leak it: if we're wrong, * another bad page check should catch it later. */ - page_mapcount_reset(&folio->page); + atomic_set(&folio->_mapcount, -1); folio_ref_sub(folio, mapcount); } }
Let's get rid of the page_mapcount_reset() call and simply reinitialize folio->_mapcount directly. Signed-off-by: David Hildenbrand <david@redhat.com> --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)