Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1243738rdb; Wed, 20 Sep 2023 04:02:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDhfZcsuzoRqBBEZ351Z6a/0Ssnn9P8hXYTBnXDrU+UTFnj4GoPlN1vsfJRQT4EcaHg+FU X-Received: by 2002:a05:6830:165a:b0:6bd:c7c3:aac2 with SMTP id h26-20020a056830165a00b006bdc7c3aac2mr2304624otr.18.1695207755270; Wed, 20 Sep 2023 04:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695207755; cv=none; d=google.com; s=arc-20160816; b=buFSDS1BVx0i4fMtI3/LNBArOY8ArnvFs66Mq9mHsVqPpjs6PS9oWivRPI8c+9FFWd VZ91MfKIukSKtkUWozJq64sp/kIEYbjEvr0VdUWZL3APbw5wLHFBt5DsN9+3QEKY6BFa loJ5GlaeSsiQvnz7omoM3vz6A7UiE7/AMQZmzj2Zo+nIqaa7a4GgHMDHZGATMXOx58Cw Naa9VYOHcSlx2cJnDhscK1kniKvCFb64/HfkRa6OvNBK1C2XiZ8nJJhP/1uFzC2wFC6F rZXnAi9NHPp6m+QXA2N7myhZBLYTUcnIJ8hNRmSQ8MEVrD2+1vvdKg8sXcfNZn7Oj8nt wbbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9cH5sDHtnVKWCV3iCYyvX8z8Hs3DAvkXrfeXQp9YY8c=; fh=sRR9gJ37ChtesxPb1iPEABChem0KgDKda8d5/HUMrrk=; b=G0Wut7lICa9t4x5FT04LaMsDviqsePQWdncYHHNGmLU/2bCpaoq9hQ2Vzu6ncwn7wf OOL8MAoJhyWoVaEKWAv5nRFEGSyVWk+IdFBnYgFihpSeDfWq6ZckTFGhf6bu0hnrdqti 858U6LfUrt8Yoegbqo9rrktl3SW2BfBjQLIQHCu9aluZ1c0lyr8NeZZXMP//KpGNtNFR VWvXWt/NBLeG2xoOVc2+CZIcawXjkdIVuImfyJAa32JT9WR3TzxcVZgeJ27Sl8687VlY lR0XmpRFMin3P3HnB6Et+OPEqhkM9LsWSf0xq75WCxDzwoULPusUD8sRD3W5cRGRpkvt ++iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OuiXP01h; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id 1-20020a631941000000b00578aedd8e8bsi3210896pgz.716.2023.09.20.04.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 04:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OuiXP01h; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 426738244CA0; Wed, 20 Sep 2023 01:07:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbjITIHo (ORCPT + 99 others); Wed, 20 Sep 2023 04:07:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232591AbjITIHn (ORCPT ); Wed, 20 Sep 2023 04:07:43 -0400 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7682F9E; Wed, 20 Sep 2023 01:07:37 -0700 (PDT) Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-490cd6db592so2736673e0c.1; Wed, 20 Sep 2023 01:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695197256; x=1695802056; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9cH5sDHtnVKWCV3iCYyvX8z8Hs3DAvkXrfeXQp9YY8c=; b=OuiXP01hUoxoUzTLFPVW9oPxBvpT1XOogxeSwwAtspy6pdhyj/s/LGbvpfopL3k8gu khWOuehEHcZZcs6IC2Js3rZ5utcZLHy2Lwstt3u/C03KYU4BvPjRTKjxFcutYQrYyM9C Q8drta0kRjN15QsKwa+1SNvq/zOybu8pANgEZtJ8dVd4htx8KD5n5P433SLYcr3jknuZ 9fnZEXvQozYw8ZKfykMzp9EocW+pBgxtfsSlmVw57SNRmN5cAqSgWNiXg4jaYY2VCi7J ECJdl/Vzfs2XQQjYfyHNfeazrMe7EMVMgp2RpEYN1oLl0YYe2w8n71ku0p/e7Hgu7tUp +C3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695197256; x=1695802056; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9cH5sDHtnVKWCV3iCYyvX8z8Hs3DAvkXrfeXQp9YY8c=; b=uY73qdB/+4aqKKX3nyhljFDazpxPlLSwMluQG/ApItrZ29gvJsUZfV49pCY8m+9N0o v9TDJAtfXQ0q3GOzJd4qQz8E1kvUQpcU4IF4xr7B6yhed3MWuRkLZ7Sa9D1zwWqM1xcs 3xQ9ldXi0VCBhs9djhBt2zjhZ0UyIfTIyhgVsG0L+FuDuBeldUrgubk1f5zyWDmsVeED zCbw1TZA8uWDBmRS8Sy9CZsklIE6tfQYtbdR7I4B5Sjg6mZ5pqPZt0oj9H/7t3NaBP0u wONKNM4ws6GWB7CE6ywdgmzm/q76n9939vV17gaHm2+WNtxKf2BY2P/3Y09FZC/kHjnQ 4h+w== X-Gm-Message-State: AOJu0YyHb94eToNjulJVWztG4Qh5LZD5fJByT+Gxqznyg+U4TqXnJ9VK Amf8PszfV2tIJ/6xO679Kdm3g2Ydxadkngee4LU= X-Received: by 2002:a1f:4c41:0:b0:48f:e0c4:1a1 with SMTP id z62-20020a1f4c41000000b0048fe0c401a1mr1862870vka.12.1695197256424; Wed, 20 Sep 2023 01:07:36 -0700 (PDT) MIME-Version: 1.0 References: <20230919045135.3635437-1-willy@infradead.org> <20230919045135.3635437-14-willy@infradead.org> In-Reply-To: <20230919045135.3635437-14-willy@infradead.org> From: Ryusuke Konishi Date: Wed, 20 Sep 2023 17:07:20 +0900 Message-ID: Subject: Re: [PATCH 13/26] nilfs2: Convert nilfs_mdt_get_frozen_buffer to use a folio To: "Matthew Wilcox (Oracle)" Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, gfs2@lists.linux.dev, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, reiserfs-devel@vger.kernel.org, linux-ext4@vger.kernel.org, Pankaj Raghav Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 20 Sep 2023 01:07:58 -0700 (PDT) On Tue, Sep 19, 2023 at 6:25=E2=80=AFPM Matthew Wilcox (Oracle) wrote: > > Remove a number of folio->page->folio conversions. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/nilfs2/mdt.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c > index 11b7cf4acc92..7b754e6494d7 100644 > --- a/fs/nilfs2/mdt.c > +++ b/fs/nilfs2/mdt.c > @@ -592,17 +592,19 @@ nilfs_mdt_get_frozen_buffer(struct inode *inode, st= ruct buffer_head *bh) > { > struct nilfs_shadow_map *shadow =3D NILFS_MDT(inode)->mi_shadow; > struct buffer_head *bh_frozen =3D NULL; > - struct page *page; > + struct folio *folio; > int n; > > - page =3D find_lock_page(shadow->inode->i_mapping, bh->b_folio->in= dex); > - if (page) { > - if (page_has_buffers(page)) { > + folio =3D filemap_lock_folio(shadow->inode->i_mapping, > + bh->b_folio->index); > + if (!IS_ERR(folio)) { > + bh_frozen =3D folio_buffers(folio); > + if (bh_frozen) { > n =3D bh_offset(bh) >> inode->i_blkbits; > - bh_frozen =3D nilfs_page_get_nth_block(page, n); > + bh_frozen =3D get_nth_bh(bh_frozen, n); > } > - unlock_page(page); > - put_page(page); > + folio_unlock(folio); > + folio_put(folio); > } > return bh_frozen; > } > -- > 2.40.1 > Acked-by: Ryusuke Konishi Looks good to me. Thanks, Ryusuke Konishi