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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D194C0032E for ; Wed, 25 Oct 2023 23:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbjJYXsH (ORCPT ); Wed, 25 Oct 2023 19:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbjJYXsE (ORCPT ); Wed, 25 Oct 2023 19:48:04 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46943192 for ; Wed, 25 Oct 2023 16:47:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14EB3C433CA; Wed, 25 Oct 2023 23:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1698277676; bh=W2aQXg7UINkNkQ5nBEQ9pqP+t3S0AEuJODIu+Q4MS/Y=; h=Date:To:From:Subject:From; b=NXZPVHilRVM0t0jVxkNJHocnMvtm8kCJjusvX4HMSqSISZoI1YO2B6nT7i8ALU+mH 4bb7U6iolM7DqUzzCtpE0jQWmxD1NrSUjIJdKq4pFUx4Of4uJz9YIJcGEaKAACTe1a sy/t1JDNJPXg4n82AoPhELrZwvBFcCzpg0DWHIbA= Date: Wed, 25 Oct 2023 16:47:55 -0700 To: mm-commits@vger.kernel.org, p.raghav@samsung.com, konishi.ryusuke@gmail.com, agruenba@redhat.com, willy@infradead.org, akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] gfs2-convert-gfs2_getjdatabuf-to-use-a-folio.patch removed from -mm tree Message-Id: <20231025234756.14EB3C433CA@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The quilt patch titled Subject: gfs2: convert gfs2_getjdatabuf to use a folio has been removed from the -mm tree. Its filename was gfs2-convert-gfs2_getjdatabuf-to-use-a-folio.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Matthew Wilcox (Oracle)" Subject: gfs2: convert gfs2_getjdatabuf to use a folio Date: Mon, 16 Oct 2023 21:10:55 +0100 Use the folio APIs, saving four hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231016201114.1928083-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Andreas Gruenbacher Cc: Pankaj Raghav Cc: Ryusuke Konishi Signed-off-by: Andrew Morton --- fs/gfs2/meta_io.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) --- a/fs/gfs2/meta_io.c~gfs2-convert-gfs2_getjdatabuf-to-use-a-folio +++ a/fs/gfs2/meta_io.c @@ -400,26 +400,20 @@ static struct buffer_head *gfs2_getjdata { struct address_space *mapping = ip->i_inode.i_mapping; struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - struct page *page; + struct folio *folio; struct buffer_head *bh; unsigned int shift = PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift; unsigned long index = blkno >> shift; /* convert block to page */ unsigned int bufnum = blkno - (index << shift); - page = find_get_page_flags(mapping, index, FGP_LOCK|FGP_ACCESSED); - if (!page) + folio = __filemap_get_folio(mapping, index, FGP_LOCK | FGP_ACCESSED, 0); + if (IS_ERR(folio)) return NULL; - if (!page_has_buffers(page)) { - unlock_page(page); - put_page(page); - return NULL; - } - /* Locate header for our buffer within our page */ - for (bh = page_buffers(page); bufnum--; bh = bh->b_this_page) - /* Do nothing */; - get_bh(bh); - unlock_page(page); - put_page(page); + bh = folio_buffers(folio); + if (bh) + bh = get_nth_bh(bh, bufnum); + folio_unlock(folio); + folio_put(folio); return bh; } _ Patches currently in -mm which might be from willy@infradead.org are