Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp561023pxf; Wed, 17 Mar 2021 10:30:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaLMy0fcRX2XYWEK/1eXYs98WOx1tqPSdMnLpsk2V7nP32pJC5mhBBIFdjOinxTn0q6SB4 X-Received: by 2002:a17:906:d554:: with SMTP id cr20mr36802059ejc.61.1616002212548; Wed, 17 Mar 2021 10:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616002212; cv=none; d=google.com; s=arc-20160816; b=CvLn4l0NqP0H9dW8+xUMdPFQAsnDXqpqgZUj38lWqm5RiYhexjJz7xNWEqUcedmFLu sszlaRZP5ZcNDHT1OQLZPDUnrQu0M37svFdg2cnyelUdAMiCW8605zhlrqU/SAF5DKJ5 n+jOErU/Tk0FrFbABWmy8V7rMPFHF3/g0cwehUAPUeQJOq32kReeCiCCLe7Z00Xs3SHT Fv0s87AtqTsNWV/pTGZ8JCGxYypyfLNdVdvbtf4O1C9jpsXYSXqQ9hOv1wmg8OKYcM9Y 4fqqW3kMsdJFcK1zLy+8EiWZkmQb7qHL+XS4p9tYzqdgoxB9DvTJuRtvtqI71SWa9SHC zWHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NkSmKyFybGGzBQdftefvTyk7NOmR2MT0T3BIdH4UDpI=; b=Ouq2EZX887O3Ls4MlNtyDsmpH1pEPqGNdgOir+75cbOryp/uVhbyKy6FSO78IrcoI+ xaTVdXXp3iJeD/q2z1UAhUsBKEI6eIicSA6bIv8gIgzUmTt7nZ4SHkf10Mk6kDk6pa19 MWAG9SSPOJRIzKPz0/iQcTK3OQRvOO5Ar1EcqWuE6EAyCKiEDOo2enKbyQ2OvP8t0t7J wHiIkR90sTMCWXsHM+PSk8NvDX5WrNPxw0TbVjJpZVWyHcO+P8BOI9iCkkNU3dFLFqNS G3O6+9XRiDrAnoZFLyie/BD5x7MzVAxGiqcYm8K0t5s1kfpz7fZu3mYZCcFe0piU5EyQ GWOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="eBVh1/xe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si16611714ejf.297.2021.03.17.10.29.49; Wed, 17 Mar 2021 10:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="eBVh1/xe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230478AbhCQR0j (ORCPT + 99 others); Wed, 17 Mar 2021 13:26:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbhCQR01 (ORCPT ); Wed, 17 Mar 2021 13:26:27 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 559F3C06174A; Wed, 17 Mar 2021 10:26:26 -0700 (PDT) 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=NkSmKyFybGGzBQdftefvTyk7NOmR2MT0T3BIdH4UDpI=; b=eBVh1/xeK05SwdJk3+2gDrxqy8 XSOIv2sdLpv+73MDj4McoTRij3ie+opRU/PmaYdY1xhICqTjEcxFOD+M5BWIh4I9ja1M+HOatORJx uXBuhgp8pSXEJ66Ajq8nBcvZIiA92XLion+5AIdVVO3KA7iO6pm3FltJQzPu1Ew/aj8Dg6RvbMD2y 2YHxOIsCzcg5nJ0Di0t9g/J51pJSL0ZJUtVW50RIdYzSNWKDW20KKXGq7i6D8ZwLCKzyGNKRxqqEB 8qbhUNHIqUN4ynv+DusmpwZPdhU6PupJPSLh23GCp9lp4zOWHXMFIgc+eC3mRiSAlaBSiDfwwe1Ch kK4CMZPQ==; Received: from [2001:4bb8:18c:bb3:e3eb:4a4b:ba2f:224b] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lMZvr-001uZ9-TX; Wed, 17 Mar 2021 17:26:10 +0000 Date: Wed, 17 Mar 2021 18:26:07 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 10/25] mm/util: Add folio_mapping and folio_file_mapping Message-ID: References: <20210305041901.2396498-1-willy@infradead.org> <20210305041901.2396498-11-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210305041901.2396498-11-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +struct address_space *page_mapping(struct page *); > +struct address_space *folio_mapping(struct folio *); > +struct address_space *__folio_file_mapping(struct folio *); > + > +static inline struct address_space *folio_file_mapping(struct folio *folio) > +{ > + if (unlikely(FolioSwapCache(folio))) > + return __folio_file_mapping(folio); I think __folio_file_mapping is badly misnamed as it only deals with swapcache folios. Maybe that should be reflected in the name? Also for all these funtions documentation would be very helpful, even if the existing struct page based helpers don't have that either.