Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3100115rdh; Mon, 27 Nov 2023 06:32:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcO229kjzdW1BWauoEIK/xRHTnBOs4ZokkJRI6wZ/nRkiUO8QEdnVH9jN5DbHsRfqmxZjm X-Received: by 2002:a05:6808:194:b0:3a7:7bd3:7ab7 with SMTP id w20-20020a056808019400b003a77bd37ab7mr13387132oic.51.1701095568558; Mon, 27 Nov 2023 06:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701095568; cv=none; d=google.com; s=arc-20160816; b=wnyN9yFmT0Iap++1SkOeNZqzXs5tHwCW0kwqcndLRp+dOSXgmXB7U3JXVrj2gtmN/5 D187gfeKxLkT1Gor8A8EQIweyXvoxxotM4oM4FH+a1if42U8xLMbCqWJ/HnXneyBbkA6 FpOgW2I3N9bY7Cawhn2zke/QmhuPzilwrEUjcnQ4ZUboBKMWc7DCH4klMLhGM4ftkIlH 4dXLIJnnQDV45wJAgOmR60Ft+fX5W6l2oqXytEu2kSeC+qxgM7vJI5gkQ2hx97cgRW6P lQUFCY2nILH8vpJj5WoebZpM7F0A+GaCDanYVFoTZwb2N+kmFSB70DUIXpX95Kw2IBSN VkGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fZIiUDywASZ5qLtxZqnaVnT8sxb13W9YOdsItG5ysDI=; fh=c4gLbwT9pvttlQWxFI2VesWIZ95B4IQ3bBh75IOono4=; b=sPBpkgjEZX27HXJeOtn8+i0PEFMAObPVE2122ZuyrzTJ+p/G2/t03ynRFSAjTeUuTr OIfniMcZbIIkz/6YB4cNn9Yy5T0NK01IUU9y0/wjhO+G7N+PSX0tKWDCLonWTMgBzKh/ LIdRJR6dQiX9DTkM7Ng3UQWqWkXmKNyUbY0kQPyy54/1PbJknPXvdT0HiWMIqQn4YTlI K+a5hiMVRSb/sBw3WGsN7RuOvBu8TZJm2QqI2NTnPprO1ay1qZqmSaZ6oB5AAGEtV4sx B4fUvkbOLOVxdU2LcAXE3WpnNric2cweLux5KGioyB3RMNs0xUvzUxc1ASiLAdz09PxC Db+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ddpL/kve"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a18-20020a056808129200b003ae574fe6cfsi4182557oiw.170.2023.11.27.06.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:32:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ddpL/kve"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-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 lipwig.vger.email (Postfix) with ESMTP id 1C7B4809B729; Mon, 27 Nov 2023 06:32:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233919AbjK0OcJ (ORCPT + 99 others); Mon, 27 Nov 2023 09:32:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233793AbjK0ObV (ORCPT ); Mon, 27 Nov 2023 09:31:21 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E461010F6; Mon, 27 Nov 2023 06:31:11 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1cc9b626a96so30352245ad.2; Mon, 27 Nov 2023 06:31:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701095471; x=1701700271; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fZIiUDywASZ5qLtxZqnaVnT8sxb13W9YOdsItG5ysDI=; b=ddpL/kveJht9XsO36Dpv4ydrFVF2gHZn0max1hT/qbuwk/6k/w9296jrSQLS4TzBLo jYR5Q+pcFZ4zegz5l9N5uIuc2DphizKoQ+5JrSrUHltDhW0I22PYgcGEDaicqvZXSatC WowotQRskAF7ezxA6U2X+WRqlx+k4oEWC539tvo9UHS34vHb/A7WlaJbB7hReeL9EKzR wex/gETBXGFhmQDeFWsk0RuVJipNqbCP8wkR6iWfAoxSI4PVCJJvP0ijQHTHrrgB9fAJ CgFklZL+wjFK+XWv9DDQpDz5QARud0hGZp4Adim8/UHIiZ1LcPc0qEZ9hsuL0ua7CBUZ tJfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701095471; x=1701700271; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fZIiUDywASZ5qLtxZqnaVnT8sxb13W9YOdsItG5ysDI=; b=FL5FzhSpbBkojd6cigJ6jvnhqUQCk4fFUBUUlJvEaDDf+5rd5hf4F48zkU93XDWJMj 033GLDAPdthkFw2plP8PE50ZvzqHEZflq9fmTGJR5zEeQarkKmA8J2H24vUARj9rhDGP FCPTCqs1VH4TQ5r/u14Mu3583VGiITbaLgBMwU260qFwFCEy0G5OdaLGW7PPYRDUC2rk dU1IDkpTeQ/EzGb3koMh3FiPamuw8Sw9jVy2iPgN2HRmZ2Jo6eME38bmccKywmE3yPW9 rdJojqyfCG/ywtcTSkiack0leKVKydZRglyluY/uASZSEsuZd2xvq82idyN4CmoAwXx2 SE+A== X-Gm-Message-State: AOJu0YxHzBkR7BADpvdaiMsB+S7LbSpBY3GEd5Rcry1zTN/5oQz9Es7t s3xRqqsQpnvIrWDulr7xGBlzs/wQsP8= X-Received: by 2002:a17:902:c411:b0:1cf:a0b1:ec06 with SMTP id k17-20020a170902c41100b001cfa0b1ec06mr13415865plk.55.1701095471403; Mon, 27 Nov 2023 06:31:11 -0800 (PST) Received: from carrot.. (i60-34-119-11.s42.a014.ap.plala.or.jp. [60.34.119.11]) by smtp.gmail.com with ESMTPSA id a5-20020a170902ee8500b001cf51972586sm8302784pld.292.2023.11.27.06.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:31:10 -0800 (PST) From: Ryusuke Konishi To: Andrew Morton Cc: linux-nilfs@vger.kernel.org, Matthew Wilcox , linux-kernel@vger.kernel.org Subject: [PATCH 10/17] nilfs2: Convert nilfs_readdir to use a folio Date: Mon, 27 Nov 2023 23:30:29 +0900 Message-Id: <20231127143036.2425-11-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231127143036.2425-1-konishi.ryusuke@gmail.com> References: <20231127143036.2425-1-konishi.ryusuke@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:32:43 -0800 (PST) From: "Matthew Wilcox (Oracle)" Use the new folio APIs to remove calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi --- fs/nilfs2/dir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index 5c9ca3f0d7f4..c7b046589877 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -284,9 +284,9 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx) for ( ; n < npages; n++, offset = 0) { char *kaddr, *limit; struct nilfs_dir_entry *de; - struct page *page; + struct folio *folio; - kaddr = nilfs_get_page(inode, n, &page); + kaddr = nilfs_get_folio(inode, n, &folio); if (IS_ERR(kaddr)) { nilfs_error(sb, "bad page in #%lu", inode->i_ino); ctx->pos += PAGE_SIZE - offset; @@ -298,7 +298,7 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx) for ( ; (char *)de <= limit; de = nilfs_next_entry(de)) { if (de->rec_len == 0) { nilfs_error(sb, "zero-length directory entry"); - unmap_and_put_page(page, kaddr); + folio_release_kmap(folio, kaddr); return -EIO; } if (de->inode) { @@ -311,13 +311,13 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx) if (!dir_emit(ctx, de->name, de->name_len, le64_to_cpu(de->inode), t)) { - unmap_and_put_page(page, kaddr); + folio_release_kmap(folio, kaddr); return 0; } } ctx->pos += nilfs_rec_len_from_disk(de->rec_len); } - unmap_and_put_page(page, kaddr); + folio_release_kmap(folio, kaddr); } return 0; } -- 2.34.1