Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3920209pxb; Tue, 2 Nov 2021 00:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSrG1kX+tMxbg9uVyBYXw7LhfdKruXP+5/r0JX8/5LRze9MBnI2T2d030ppXF0+RNRAPHW X-Received: by 2002:a17:907:3e96:: with SMTP id hs22mr42726411ejc.199.1635837924292; Tue, 02 Nov 2021 00:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635837924; cv=none; d=google.com; s=arc-20160816; b=CDnlZscRwiVGcIExJASINw1cFG5jg3sb7wdXMaP96Nbpd4SZrh6dBjTcIfMU7xZKEu ctLOCyY97rfovx7LOjwQS+7YiBAfZt/gIXh2GpRPhtJ+gUPHvXZqosf4gl+ihH9ihstd Bqqv+2FQL7HXUs+4q26+HzksU4EOhSXfmZTifSKTPhUlrsokW4lc8pVoVJwSoAxKFicX DLLBu/CcLkamoe36TyvcTH8+3DOEaavpv/lUSGFer5jSnw2RA9xwUzt83fSIJ2KxhZtl zrzS9wBOGF8ZgfBtAOGCEM9hNMR6PahMocsucvsA+4+yDomdJUdL80XWB3Y0hmp2sBdW 59LA== 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=wDLhAnhRGJ38F/R5GBK7oivxF6ESZSsILVg+gz9cSFI=; b=JF/ZwnJZ+UzjNrA+sX6hszGYubpq4a4+ikcoRctGbwZP7bCbBDPMVL/3N3AszbBC79 qWcwSkQTWmwiERZv1jklYv0FqaJpugHpghVQdDTo6lJ0TJcW/tYJK+Y/JkT7o5zH17Of mf3bvAHJyClOjdIiSC+iuE4iKINVl3S76QohowTtAVE7P9Cy6NOuVAAYRvcFkVJZtnTL hzRRrRdk4IGJSurS0t+cDpL3RDp0FDu0rY2pNloO4fErtAbmeftsNs3CuqRL911wYLUc beguSrd29P9fL6pyqprsLIpRvW/8tCxMv9C/ka3N1A42Gfw5etIgGm6cuy2FeJq+akVv KIpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OouaVoGt; 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 z16si11761904edb.308.2021.11.02.00.24.59; Tue, 02 Nov 2021 00:25:24 -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=bombadil.20210309 header.b=OouaVoGt; 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 S230465AbhKBHXY (ORCPT + 99 others); Tue, 2 Nov 2021 03:23:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231138AbhKBHXX (ORCPT ); Tue, 2 Nov 2021 03:23:23 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3395EC061714; Tue, 2 Nov 2021 00:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=wDLhAnhRGJ38F/R5GBK7oivxF6ESZSsILVg+gz9cSFI=; b=OouaVoGtagEHDIi4N16OO6TvNo m+z7eZobmUwYUoALqjEs0GnipY2N0Dz2cYcN4eOXmdI+yGrhrVouqPGgq2THVRLw9MZwN4eeTmt6z X3gwYUDGagCxLEg4r+zC06bgNS3+eL3BfmqSd+ZYcSLPNvIaZBzDRLcniJ2KzrYVbAQx6tNDVQwPU MtCJykhhLXONYq1xGfTBAQ8xh8n5FX64lL3Hw/k6zvDR1WA93h45nrSa+LmqlTjOEILvDxU5z4iP1 cPdaMa967H30t8qYMsHmlLAdxGR5ywc0EemFFC1r8WDgKQdp6NY9KxRzO8IoOl0Bq5WE4isHs55MG NOLWVxGw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mho6B-000lC1-5f; Tue, 02 Nov 2021 07:20:47 +0000 Date: Tue, 2 Nov 2021 00:20:47 -0700 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: Re: [PATCH 13/21] iomap: Convert readahead and readpage to use a folio Message-ID: References: <20211101203929.954622-1-willy@infradead.org> <20211101203929.954622-14-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211101203929.954622-14-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 01, 2021 at 08:39:21PM +0000, Matthew Wilcox (Oracle) wrote: > for (done = 0; done < length; done += ret) { > - if (ctx->cur_page && offset_in_page(iter->pos + done) == 0) { > - if (!ctx->cur_page_in_bio) > - unlock_page(ctx->cur_page); > - put_page(ctx->cur_page); > - ctx->cur_page = NULL; > + if (ctx->cur_folio && > + offset_in_folio(ctx->cur_folio, iter->pos + done) == 0) { > + if (!ctx->cur_folio_in_bio) > + folio_unlock(ctx->cur_folio); > + ctx->cur_folio = NULL; Where did the put_page here disappear to? > @@ -403,10 +403,9 @@ void iomap_readahead(struct readahead_control *rac, const struct iomap_ops *ops) > > if (ctx.bio) > submit_bio(ctx.bio); > - if (ctx.cur_page) { > - if (!ctx.cur_page_in_bio) > - unlock_page(ctx.cur_page); > - put_page(ctx.cur_page); > + if (ctx.cur_folio) { > + if (!ctx.cur_folio_in_bio) > + folio_unlock(ctx.cur_folio); ... and here?