From patchwork Mon Mar 31 20:11:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 14034054 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AE9CC3601A for ; Mon, 31 Mar 2025 20:14:11 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tzLWM-00019B-Pl; Mon, 31 Mar 2025 20:14:11 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tzLVg-0000lf-UD for linux-f2fs-devel@lists.sourceforge.net; Mon, 31 Mar 2025 20:13:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qjw5xibtNyi8x65rtUe3k2fUFGZv4Lxhs/wmfXrtFW4=; b=PM38tNsZVTH+xhG7keCas64fCE zEz5mKzxouyPxCsdo/kkfE5odS67kOhdHamw0Rv51IQm89KollKK7o6g35hPo6BjgffySzuEwtxb2 0w+Qv+AEfcpAiPH63ycEXroivxt2/F7ssuvMK7QFPnV7tSONxoMhOSolrqsMkMUWs5AQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qjw5xibtNyi8x65rtUe3k2fUFGZv4Lxhs/wmfXrtFW4=; b=gCmhKQNFVoe1Mtaqa9udq/UMCM uGst9VztT0O9ec7sjI44Hr5xMad/EdgElL1ZnQI6rtvTUuB0MmEITOOq6JiUJSnwAH8ULi7ENiGrW 5l3WcYAQCeOVHfIvOe/OUd6pP1iXmakeREcBkDTG6QLMHRjfxPwODUapAOVLj94Jh160=; Received: from casper.infradead.org ([90.155.50.34]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tzLVg-0003e7-Na for linux-f2fs-devel@lists.sourceforge.net; Mon, 31 Mar 2025 20:13:29 +0000 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=qjw5xibtNyi8x65rtUe3k2fUFGZv4Lxhs/wmfXrtFW4=; b=qKn7KYiTJqbmZz8n546e1wYm9j OHlHL0pCghhxkXqSMSZDAWLWILNJH9f0QQA7i7/JJ3iTB1N53kDFFFHzkhtZHpLQISehWbJbK33pH fLa1A0BZqCZWC3eGx85BdO7Kk0KtEvSPFdA22fCz5m8ZPnhjMc5G/vztic7dj9MZDO5P+ool8KM2y suwtHArhLdQZ/heVSVj7z5lKHBwZvk8Szgj63r4QPCWITT0Xt1UskM2yZXkQEFbaqSRFtetmBqN7n p7cRSCCSKlijXNo2ecoTLYn1VXcuI98ty1q+DfGMdAtWrFdXbRN5n74U6+wEV7zC4UKaHXsLCjd0Q 57YV2Ueg==; Received: from willy by casper.infradead.org with local (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzLVV-00000004S8l-1UgY; Mon, 31 Mar 2025 20:13:17 +0000 From: "Matthew Wilcox (Oracle)" To: Jaegeuk Kim , Chao Yu Date: Mon, 31 Mar 2025 21:11:54 +0100 Message-ID: <20250331201256.1057782-95-willy@infradead.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250331201256.1057782-1-willy@infradead.org> References: <20250331201256.1057782-1-willy@infradead.org> MIME-Version: 1.0 X-Headers-End: 1tzLVg-0003e7-Na Subject: [f2fs-dev] [PATCH 094/153] f2fs: Use a folio in f2fs_truncate_xattr_node() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Matthew Wilcox \(Oracle\)" , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index cc4c3ba98140..d1fa244c9fa7 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1242,20 +1242,20 @@ int f2fs_truncate_xattr_node(struct inode *inode) struct f2fs_sb_info *sbi = F2FS_I_SB(inode); nid_t nid = F2FS_I(inode)->i_xattr_nid; struct dnode_of_data dn; - struct page *npage; + struct folio *nfolio; int err; if (!nid) return 0; - npage = f2fs_get_xnode_page(sbi, nid); - if (IS_ERR(npage)) - return PTR_ERR(npage); + nfolio = f2fs_get_xnode_folio(sbi, nid); + if (IS_ERR(nfolio)) + return PTR_ERR(nfolio); - set_new_dnode(&dn, inode, NULL, npage, nid); + set_new_dnode(&dn, inode, NULL, &nfolio->page, nid); err = truncate_node(&dn); if (err) { - f2fs_put_page(npage, 1); + f2fs_folio_put(nfolio, true); return err; }