Message ID | 20240522210341.1030552-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 D5560C25B7A for <linux-mm@archiver.kernel.org>; Wed, 22 May 2024 21:04:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B2BC06B0099; Wed, 22 May 2024 17:04:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AD88C6B009B; Wed, 22 May 2024 17:04:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 904716B009D; Wed, 22 May 2024 17:04:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 60D346B0099 for <linux-mm@kvack.org>; Wed, 22 May 2024 17:04:04 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1661AA8348 for <linux-mm@kvack.org>; Wed, 22 May 2024 21:04:04 +0000 (UTC) X-FDA: 82147259208.19.2161461 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf25.hostedemail.com (Postfix) with ESMTP id 645AEA000C for <linux-mm@kvack.org>; Wed, 22 May 2024 21:04:02 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=fTyhkeWl; spf=pass (imf25.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=1716411842; 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=UoCowHIZmwbvZhrcmlKDIE01w7msvc9uRa4jOe21Z9s=; b=4+mtkg6lfi2UM4gxLxHENkI9yyg0DE+OqIDEE+Wcwn1gtMkvlRz0J8d2quBmZnj77mMSsf 3t2aFPxZBjxpJtAXQdQZcptm5FIGFt5Kk1+2iPCIUdj/mmqCdSkiMISGSJ8wgtJnJQ3s7P Xyto5OOQpSakGcAXRG/+Z/K7lOwAd6g= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=fTyhkeWl; spf=pass (imf25.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716411842; a=rsa-sha256; cv=none; b=y0/8/3Okk1B9gpv8J+h584xloJiZ6ey5sQxmVKdkkn+j2C/RIufuXJG+GyOtc9qhJ6C+XW WydI+krCvxdVmk91nxKSyf6HLNAeFZETaxNF3gVDDzfb18tuHTijcfM9YSQT9RRB+reTmo 5Nm8kv1lbA1+Ks245B2ejE26d2DX4qs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716411841; 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=UoCowHIZmwbvZhrcmlKDIE01w7msvc9uRa4jOe21Z9s=; b=fTyhkeWlGhpiTNDRbJVouWI9IkWIIQ4NquTg7hPWe6i9or7tiRwpfZTKdamyE4GSEjoiqO Os7Z2B44Y3H44kQcKUIM2lFqQlWElXs45rjCFW7+coyMWryIfKY7otAlDfVDogy8RTLqp4 R4VTbauXZgpzIdEp+rOPy9CleAMXbHM= 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-194-SYtBQfzfNPKl0OuyCBwpzw-1; Wed, 22 May 2024 17:03:58 -0400 X-MC-Unique: SYtBQfzfNPKl0OuyCBwpzw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 C62691C05142; Wed, 22 May 2024 21:03:57 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8409628E2; Wed, 22 May 2024 21:03:55 +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 RFC 5/6] mm/filemap: reinitialize folio->_mapcount directly Date: Wed, 22 May 2024 23:03:40 +0200 Message-ID: <20240522210341.1030552-6-david@redhat.com> In-Reply-To: <20240522210341.1030552-1-david@redhat.com> References: <20240522210341.1030552-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Stat-Signature: o5d69zrwixs1euzew3neace7hrq6qws3 X-Rspamd-Queue-Id: 645AEA000C X-Rspam-User: X-Rspamd-Server: rspam10 X-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XbySE9ONE3zmqm79PWorisqQ4R7Xk5O1uQkQzewrhV2sNaSTl8WuH+ne1bmZfBM8wwP4EiIfCd+YDTJODEv//gu500FdJirZLjT6atoy32Eu2LhPUWUUENoWfn2eZsZE3FU/canVLIkJ+xEoEoFK0F6IBT5v2fqNT6Mh1BpTUjh9d12DBi61hFRCwht6NPZNwh930VCdhbnCnDmZnfh64gH0jRhU1grZhSfC 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(-)