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 43286C7EE23 for ; Mon, 5 Jun 2023 17:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231721AbjFERFP (ORCPT ); Mon, 5 Jun 2023 13:05:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbjFERFM (ORCPT ); Mon, 5 Jun 2023 13:05:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B51B2A6 for ; Mon, 5 Jun 2023 10:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=LBEHna36Uqv0DtI27xHHPAjPGLK1nkaVHaUv/vrGrqc=; b=H/yLWyeN4OqUM4cMLvEOC1taDO Hpa4Fe79T8Y4Y6SfisBrVTRWiQ5mpyoDtzgAYDsgPaGsbu+2uMLPGPua+IWXlicLctjfuVOBYWyR+ TzNVy4P2Fr3yguKQH8E8xhCK0q3DWc4Ms8tclnh0ZEVjC2FhubQkQL2zT6BdXEcPpYg8J4lrd8qGE 9qViKdZQq18AFRCSWGG6Rm5cdPx0V2s1rz/kjHQ5R5Vk7cGHjYh8BXMNJO73V/iit1QL06SFatwaY ZP0r6BCFNJBN7Wslh2rCt9R/saxvZkm2E9WdBtQDDBMnVXiSCzTHMv9tsUj5JXahTPxC/BVMDn/Hd Xc1dAm7A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1q6Ddl-00CDQa-Eb; Mon, 05 Jun 2023 17:05:09 +0000 Date: Mon, 5 Jun 2023 18:05:09 +0100 From: Matthew Wilcox To: Richard Weinberger Cc: linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 3/4] ubifs: Use a folio in do_truncation() Message-ID: References: <20230605165029.2908304-1-willy@infradead.org> <20230605165029.2908304-4-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230605165029.2908304-4-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Jun 05, 2023 at 05:50:28PM +0100, Matthew Wilcox (Oracle) wrote: > Convert from the old page APIs to the new folio APIs which saves > a few hidden calls to compound_head(). Argh. This fix was supposed to be folded in. diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1b2055d5ec5f..67cf5138ccc4 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1161,7 +1161,7 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode, struct folio *folio; folio = filemap_lock_folio(inode->i_mapping, index); - if (folio) { + if (!IS_ERR(folio)) { if (folio_test_dirty(folio)) { /* * 'ubifs_jnl_truncate()' will try to truncate