Message ID | 20240527141454.113132-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 DFD60C25B7D for <linux-mm@archiver.kernel.org>; Mon, 27 May 2024 14:15:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 986C86B009C; Mon, 27 May 2024 10:15:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90FAC6B009D; Mon, 27 May 2024 10:15:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6ED1C6B00A0; Mon, 27 May 2024 10:15:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 47FD36B009C for <linux-mm@kvack.org>; Mon, 27 May 2024 10:15:19 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C3273C11A7 for <linux-mm@kvack.org>; Mon, 27 May 2024 14:15:18 +0000 (UTC) X-FDA: 82164373116.30.CD0E265 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 117561C001A for <linux-mm@kvack.org>; Mon, 27 May 2024 14:15:16 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=MA3R21F3; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf20.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716819317; 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=1jgAtxlgpKD5tttWASyjS08Kd902IxQGps+U4uBLOWU=; b=xbOKwRN5XSNTcgw88Q/ycVrwFYgdIFjfeC365Ov+ogJoPwCxYj4VFBabksOrVQX/wFwCMG wq/w+HN6oa5j2+qx11oVg4Re49YhQGQ9x7jut2y2vXCNDyUTUSvqbfx+CquHHfD++g6Ar9 FZl5plDPM4SA37Px3cSw2WtKLISNk7c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716819317; a=rsa-sha256; cv=none; b=Cm30bbSYNWCFYvuEmhVw5cymUEvlcEtzHrCw8Nd7plDAmN7n6eZKA+vuY+UMlKHCR63/wD oWnnQ+rmtUH2DldtP5vlROY5LrAXEOzwjCzD2dVKdsYC2j9sGsji8DC8o+3O2If2m+ibmP yOydu5NHMID3t8wRBfzqoUnt/zfuFpQ= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=MA3R21F3; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf20.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716819316; 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=1jgAtxlgpKD5tttWASyjS08Kd902IxQGps+U4uBLOWU=; b=MA3R21F3hPbj22MNXKamNxVMvJIEkAcEIeX+0FCwNCtPewEM2JjDTvoy5DqAh+4Ky4akXu J5W8AYMdHdBgfN86wzP8Dgnn6ehs9lnhNPDi7sbMxCap9p8trdrfF9buWmdqGcccWSZpJD JV9+z7AjB5YlcHmv4tPNVtIeLG7yOS8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-602-PvG6X_TONr6hv4V8Z_f-EA-1; Mon, 27 May 2024 10:15:11 -0400 X-MC-Unique: PvG6X_TONr6hv4V8Z_f-EA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 641568025FC; Mon, 27 May 2024 14:15:11 +0000 (UTC) Received: from t490s.redhat.com (unknown [10.39.192.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 89ADF1C00A8E; Mon, 27 May 2024 14:15:09 +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 v1 5/6] mm/filemap: reinitialize folio->_mapcount directly Date: Mon, 27 May 2024 16:14:53 +0200 Message-ID: <20240527141454.113132-6-david@redhat.com> In-Reply-To: <20240527141454.113132-1-david@redhat.com> References: <20240527141454.113132-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Stat-Signature: i1sjohj3kx7b9fyaj1pwt7343ksegfox X-Rspamd-Queue-Id: 117561C001A X-Rspam-User: X-Rspamd-Server: rspam01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YC3yh8UCSr+tG/7C5RwcO6HDmwzpXTaOqWHZWKs36+cyNjTMmtZbIpo+j+PChxKBkRaDXZKy49RG1lFq+EqSf+tpu4Tkfm30B05knzaCMXm3QbohhK7Zj9WmJaShggWbEVXXMIaz6NWbJ/aJjb3fSfZz2sBiyzgV59F5gvPzNZZfOnRHfsMZoLFq6uZTyrO5NGK/Y9sAL/4Nm25UunbnXadq4EzJNpyCXnWEc0CDMpCugA 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 382c3d06bfb1..c4ac7289e88a 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(-)