From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E0AFC433B4 for ; Tue, 6 Apr 2021 13:31:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 00B0F613C3 for ; Tue, 6 Apr 2021 13:31:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00B0F613C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 861A96B007E; Tue, 6 Apr 2021 09:31:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 825666B0080; Tue, 6 Apr 2021 09:31:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7133A6B0081; Tue, 6 Apr 2021 09:31:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id 54CCE6B007E for ; Tue, 6 Apr 2021 09:31:22 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0328C6D87 for ; Tue, 6 Apr 2021 13:31:22 +0000 (UTC) X-FDA: 78002028804.19.B9DEAC2 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf09.hostedemail.com (Postfix) with ESMTP id 053DB601D8C1 for ; Tue, 6 Apr 2021 13:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wQuSgXvvayHccqDmkcsLOwlAkT4r6qTVRKvApKKeAHE=; b=QoXafGbjSMFSahCUJ4nxDTUD3P rFsvFlqB+0rSuJbWYoatudI9IGCUCB9MAdIO/kpAMmqcnvpQr0mYUYiOEP/wTPDrPE7pHDIzcijKh 3kg34KvSZmbaCUZYjqbBeczXm8UhnmUIKBhTFBlpcre7Gzr1s9xAdANZ4TTQSeVCALpEhwkgWbn4d UFvuGBOMQ2rgjw6ojpgZOnhr55YMGyM7ouZwTT0F6NhoTSE7xHu99EgFt7MkkDzAJvkeVEri1r3X4 TojqIhbKgIcV+3KX0z7dE7kh+iru41FOEK1yALk8j9cBpFFHjv1r7CZmNA0HPwqZkkai9627pM8ev +xXCHq5g==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lTln6-00CrXl-3O; Tue, 06 Apr 2021 13:30:53 +0000 Date: Tue, 6 Apr 2021 14:30:48 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org Subject: Re: [PATCH v6 05/27] mm: Add folio reference count functions Message-ID: <20210406133048.GD3062550@infradead.org> References: <20210331184728.1188084-1-willy@infradead.org> <20210331184728.1188084-6-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210331184728.1188084-6-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 053DB601D8C1 X-Stat-Signature: h4xzfb5h6rj9r9r8f6dm8ir7x54icboc Received-SPF: none (casper.srs.infradead.org>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617715879-610967 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: On Wed, Mar 31, 2021 at 07:47:06PM +0100, Matthew Wilcox (Oracle) wrote: > These functions mirror their page reference counterparts. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > Documentation/core-api/mm-api.rst | 1 + > include/linux/page_ref.h | 88 ++++++++++++++++++++++++++++++- > 2 files changed, 88 insertions(+), 1 deletion(-) > > diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst > index 34f46df91a8b..1ead2570b217 100644 > --- a/Documentation/core-api/mm-api.rst > +++ b/Documentation/core-api/mm-api.rst > @@ -97,3 +97,4 @@ More Memory Management Functions > :internal: > .. kernel-doc:: include/linux/mm.h > :internal: > +.. kernel-doc:: include/linux/page_ref.h > diff --git a/include/linux/page_ref.h b/include/linux/page_ref.h > index f3318f34fc54..f27005e760fd 100644 > --- a/include/linux/page_ref.h > +++ b/include/linux/page_ref.h > @@ -69,7 +69,29 @@ static inline int page_ref_count(struct page *page) > > static inline int page_count(struct page *page) > { > - return atomic_read(&compound_head(page)->_refcount); > + return page_ref_count(compound_head(page)); > +} I don't think this change belongs in here. It seems useful though, so maybe split it into a standalone patch? Otherwise looks good: Reviewed-by: Christoph Hellwig