Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2422072rdh; Sun, 29 Oct 2023 15:55:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcONvw8DktvmsbZdPxi/5FjfdHARtW+274F1SQojrXXl7mm9km/K5v8lmT1Gyrl4RVQ9qI X-Received: by 2002:a05:6e02:b45:b0:34c:f2cb:b2c with SMTP id f5-20020a056e020b4500b0034cf2cb0b2cmr12885827ilu.19.1698620103734; Sun, 29 Oct 2023 15:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698620103; cv=none; d=google.com; s=arc-20160816; b=ctbOtI70UPCsWHv/VIYHP1hIoEKCymeEEeZjgMvjRiWsk4wDb1rJGqOQA1V/wA3OEW C9CDAGjUNchiwpfNe1XVBDdRLsSa8qgvfz1UKacOYk3G+k5K46YC1vLMz36QdhB05VIt qPUsIcbU4qJGz4OaPLs51AoSH7IPmsISUTDKQvbyxqcv81nLtb+6jrcZkQs8XDRJ8BUe k6Q9sjrWmavtBolqLD64bxKWkR/3TLhwMSjNCohbUkBpciNdc2ecHbVJdg6ZkpGySlwp TrhWQ91PfQk4HeUhzrx1de9Y1Atu7HYm+N7ffyj4GDoXFHlioUj3V+u6Thm+1kS1iKRv tYpQ== 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=o4vf6NJMeardmkyGF5ZHF/71WY7F6OBn/724LYdzrJw=; fh=IVcZYgopwke+Bc9cmwdOT5yAIhnLPNAsBqE9TuY8J+c=; b=szjzFS1kVwLieNpsuU0NCwiqfA52nwA0P1vaIZvo1ZoPBlvjUXOCTIUg1zTIt0xoVq ss2tIiTMsuYDbWPu7UsfS1g93Nq8GIOPpuPPccOWb6iDAcWfWqwlQucVAL45UhDA2WAF h1mvkuf8s9zEZfR4rM1FRDlRdh1dN/MLQpfMfPKUtggB6fLTlYwBK/FbfLZs0Js+XdDN DAHBD6yKrFlIidYTGwk3mu/AD+s/F6vkQw+7wrHoIBMkrb+i788Zdw+UX2IY3qowDhEZ T7AJY3vxmTIda4Yw097rKErqpGLi7Yk+y8vucuZKwEIzLfWrdeqyRvvoS8lf7Xtsx/Qz e9hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fUC2mR6w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b21-20020a170902d41500b001c5fd2a28desi4045020ple.222.2023.10.29.15.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 15:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fUC2mR6w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8AEB7804DDA1; Sun, 29 Oct 2023 15:55:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbjJ2Wy6 (ORCPT + 99 others); Sun, 29 Oct 2023 18:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230473AbjJ2Wyw (ORCPT ); Sun, 29 Oct 2023 18:54:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1914C4; Sun, 29 Oct 2023 15:54:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75AF1C433C8; Sun, 29 Oct 2023 22:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698620090; bh=HEJySmFIPXp/qtX8bBaR6qOV2wTlUZLXGnD5QLaurZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fUC2mR6wYsACrhUi4ieM068TznkqauiMgdwZ/gxw0dTRNnn5QyqjxdNcsDS13yZSw +4L2Jpbg3q3pcnkWx0ryH/GYet14sHdtAmh7ipmCEhDFteHggmJuM9XWgAHqipXzq8 GEHLTYZsmDrlT4aDr6+muJrQhw286VqdNxfjozmcuV4TT+bFgqhE2zIubRw3scNIQf ogfBRyGCG2i9Y7lLV3AyluxQXKc8WKga1wgy+iGZzts2mN8SQmwtcG4VvF4o+qDZBy kuKBwdG7diGeXSJD5/75cLtpPHZuuHglpIYPQrrG1GG6fEc7iIQspGDo/SMAp9YivG Uuy51pW1BvCjA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Konstantin Komarov , Sasha Levin , ntfs3@lists.linux.dev Subject: [PATCH AUTOSEL 6.5 03/52] fs/ntfs3: Write immediately updated ntfs state Date: Sun, 29 Oct 2023 18:52:50 -0400 Message-ID: <20231029225441.789781-3-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029225441.789781-1-sashal@kernel.org> References: <20231029225441.789781-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.5.9 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sun, 29 Oct 2023 15:55:02 -0700 (PDT) From: Konstantin Komarov [ Upstream commit 06ccfb00645990a9fcc14249e6d1c25921ecb836 ] Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin --- fs/ntfs3/fsntfs.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index 33afee0f55593..edb51dc12f65f 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -983,18 +983,11 @@ int ntfs_set_state(struct ntfs_sb_info *sbi, enum NTFS_DIRTY_FLAGS dirty) if (err) return err; - mark_inode_dirty(&ni->vfs_inode); + mark_inode_dirty_sync(&ni->vfs_inode); /* verify(!ntfs_update_mftmirr()); */ - /* - * If we used wait=1, sync_inode_metadata waits for the io for the - * inode to finish. It hangs when media is removed. - * So wait=0 is sent down to sync_inode_metadata - * and filemap_fdatawrite is used for the data blocks. - */ - err = sync_inode_metadata(&ni->vfs_inode, 0); - if (!err) - err = filemap_fdatawrite(ni->vfs_inode.i_mapping); + /* write mft record on disk. */ + err = _ni_write_inode(&ni->vfs_inode, 1); return err; } -- 2.42.0