From patchwork Mon Jan 9 05:18:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 40670 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1985850wrt; Sun, 8 Jan 2023 21:23:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZLzxdEQ3hzM24PRfiDU8vlPP23r+tefJ3lJXw32fMVYbEIWZe3xjHxrdewESqYk84xnHU X-Received: by 2002:a17:902:db05:b0:192:7c38:4842 with SMTP id m5-20020a170902db0500b001927c384842mr74599431plx.53.1673241794013; Sun, 08 Jan 2023 21:23:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673241793; cv=none; d=google.com; s=arc-20160816; b=PCPzkSoZA630DF8fjSfwmChG6KBuXDQdZfhZ0YM29MQ6xoZrTBnW7mSxDDnm77CuSa 2ZuStd1U3Uhbo2pr0baTcJTuI3EO+ifLjtBTO+nOhtaO/gXmkgSbUP8DL3IfDe4Vq8y2 EJbaPv3FUF0fGZtPHfdH14s1lfRvK4nKRp91taQOgITKtGiQOLAaId/rGseIk7Eoezyq DXJf6ZmPu66DVf1+cQ322Khd5H7OqJzNPSRdQ0izIp45jwTtPc9v1aWoyyp7UOyUrq+m C/v8Pf4d0PKSsNgJCQVFa8N2NhsrZO13i1WWl6PBvW55Gnnhkjmk+y44k+fR7YdpkKEQ X9ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=h9sfp3qLT5oZoYTMaEr7e7TXlhgkzcAwkjYXoXSr31A=; b=f38r9hYvDe+6w9LOIJxpxHQaez/DMXMSZNQUAnbvUdrPURY8C4+yEr0TQxZTi2BTtD Hx7Pa8ZZvqASLaadA1c3G5iyXjxLxcdZ7aYd3p10HWOSf7joPWuKKnnlcLJc5cPoBGWa Gb55cFigq5RBvaC0CtqEXnI8E2pI/flFrnaflqQnl8u8OKpKfIRT0bh9/9TmWmupceoS f0ba00WnfhnjihuGqVV70KzEdiYQsTDN8mMHO6SKRHqe8hxQ10mkREx3Kp/+ZoZ9UrD3 sDDqoDDPGQGOVjg8un3RlwvQHnb/WHEcpx8GOfulTlJQZ908Meha6dH3ZIACGiE3mKst W2JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=PcO+1hL8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a170902e15200b00189b15ea35bsi7698024pla.208.2023.01.08.21.22.59; Sun, 08 Jan 2023 21:23:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=PcO+1hL8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236517AbjAIFTx (ORCPT + 99 others); Mon, 9 Jan 2023 00:19:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236277AbjAIFS1 (ORCPT ); Mon, 9 Jan 2023 00:18:27 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D43DECE16; Sun, 8 Jan 2023 21:18:26 -0800 (PST) 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=h9sfp3qLT5oZoYTMaEr7e7TXlhgkzcAwkjYXoXSr31A=; b=PcO+1hL8pqtTOSY4yjQyps5RAT 8G47NpMFqRsfCTyyb3fqOkD4nZvLhv1r3FVYZrLgN00r1oeN21QCtKgEmFKzGXeWTCrysJbJ5YCil Aen/7Z5sWnYFTkumxQdid4EhfMATxkw91mIj+zVArGyLIan5liKmfdqEW61z3f8VWfKyIhAxEoXFX OFPTEcFDp3LtnC3sMgROMruznAor3rlG093CS6uBuQeVaKkIhsONDXkN5aHoXxKuympj6b484oPaV jgvthhmyZLyRzVTiLrG9W00eMDs0V5nEXE8hsS2ogRU3/wyaoGYP/GTMBu+Za3JZpHnvcsoysOqXm XozSWbbw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEkYD-0020wt-9W; Mon, 09 Jan 2023 05:18:25 +0000 From: "Matthew Wilcox (Oracle)" Cc: "Matthew Wilcox (Oracle)" , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: [PATCH 04/11] fuse: Convert fuse_flush() to use file_check_and_advance_wb_err() Date: Mon, 9 Jan 2023 05:18:16 +0000 Message-Id: <20230109051823.480289-5-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230109051823.480289-1-willy@infradead.org> References: <20230109051823.480289-1-willy@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754521187229940226?= X-GMAIL-MSGID: =?utf-8?q?1754521187229940226?= As with fsync, use the newer file_check_and_advance_wb_err() instead of filemap_check_errors(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/fuse/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 875314ee6f59..7174646ddf09 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -500,11 +500,10 @@ static int fuse_flush(struct file *file, fl_owner_t id) fuse_sync_writes(inode); inode_unlock(inode); - err = filemap_check_errors(file->f_mapping); + err = file_check_and_advance_wb_err(file); if (err) return err; - err = 0; if (fm->fc->no_flush) goto inval_attr_out;