From patchwork Thu Jul 13 03:55:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13311252 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 856C2C04E69 for ; Thu, 13 Jul 2023 03:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233776AbjGMDzn (ORCPT ); Wed, 12 Jul 2023 23:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232119AbjGMDzk (ORCPT ); Wed, 12 Jul 2023 23:55:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D73E1BF2; Wed, 12 Jul 2023 20:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=jYGr8ODFn2NMtrawIS2Yz1RKc1fA/K4tKHEsM65sMaE=; b=aU2YHRc9daHN+V6qJy3ls9y5WI pEeuHSjUwf0LcruyUze/uhjuturw2lvaJWJunAHkc7g8nTM4rnWysCCHU2Iow5jKivM2cbNWO2VF5 CEgtu3zl69TS/qsCiCBEh4nlv1Do/63Etui6LLLOiq52UjloG9dqBSNswd9tcFkGXZFIBGgILQfeu 9XRn2FXx4wmE7gZQZDoAHPtFzR2NoMRM3bGfJQloGzGuopffaHV/O7KthX5s7LjXWN99NGOvhiMS+ EBtPgjf2p6SzYgznFS4EPFaNUc6ppFQcwUiAYTVBiMG4+/KVYx6JAeTJ2vusoOjLuGTQZHOzBNGhH rBX+QdYQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qJnQA-00HMrg-As; Thu, 13 Jul 2023 03:55:14 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , David Sterba , linux-fsdevel@vger.kernel.org, Pankaj Raghav , Konstantin Komarov , ntfs3@lists.linux.dev, "Theodore Tso" , Jan Kara , linux-ext4@vger.kernel.org Subject: [PATCH 2/7] affs: Convert affs_symlink_read_folio() to use the folio Date: Thu, 13 Jul 2023 04:55:07 +0100 Message-Id: <20230713035512.4139457-3-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230713035512.4139457-1-willy@infradead.org> References: <20230713035512.4139457-1-willy@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Remove use of the old page APIs. That includes use of setting PageError on error; simply not setting the uptodate flag is sufficient. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Sterba --- fs/affs/symlink.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/affs/symlink.c b/fs/affs/symlink.c index 31d6446dc166..094aec8d17b8 100644 --- a/fs/affs/symlink.c +++ b/fs/affs/symlink.c @@ -13,10 +13,9 @@ static int affs_symlink_read_folio(struct file *file, struct folio *folio) { - struct page *page = &folio->page; struct buffer_head *bh; - struct inode *inode = page->mapping->host; - char *link = page_address(page); + struct inode *inode = folio->mapping->host; + char *link = folio_address(folio); struct slink_front *lf; int i, j; char c; @@ -58,12 +57,11 @@ static int affs_symlink_read_folio(struct file *file, struct folio *folio) } link[i] = '\0'; affs_brelse(bh); - SetPageUptodate(page); - unlock_page(page); + folio_mark_uptodate(folio); + folio_unlock(folio); return 0; fail: - SetPageError(page); - unlock_page(page); + folio_unlock(folio); return -EIO; }