From patchwork Fri Oct 21 16:53:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Komarov X-Patchwork-Id: 6874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp804085wrr; Fri, 21 Oct 2022 09:59:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pr0dxKErbMXgQkQp7D6lzsXlVGDIRekrCqVFVMm7fgTQFZWS6zLskesitruzRwXIOwxgU X-Received: by 2002:a17:907:6d03:b0:782:abba:936c with SMTP id sa3-20020a1709076d0300b00782abba936cmr16387553ejc.758.1666371562844; Fri, 21 Oct 2022 09:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666371562; cv=none; d=google.com; s=arc-20160816; b=aXuhb9QXrINqAA1iyApMW/TP+WbXZYZd7YnHT62MR6XfRKAPqTgHwHVQuMh7y1feR0 3OoFhpQX5fuZ4oMs1l0zp2MGuxCvPd5Vhn/nRwdqBceCpClHfcN3tbNgWhQgfTR4q9GM K4FeiOpqU0rkT3YOlDl/K1eDh/3dO36PF1idHtLWdvxQYW2nLraAuz4iQXoW4xZZF6qB O6+z8aZr80v7aMbCcJS6D5E02BE60r4p5ftVJ9082MLTHF4kscA0NGXKRhxlhh7RLlJJ VR9bxbqc8/KZRnr0pvP3t/rxnGxDmPwXvjONk2pz2v+cldpdz+1OLxNMmBXWHHAVSwD9 R3LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=d0P/O+Kp+C+ez1qFGFR5y9BK+bKwVlzJw6ae9PLolSM=; b=LOI10trPbUhgxeudkzYz62D5avLEu4AfWhdgDpPxGmxF/cJyU411DNDy7CvJ76JOnb uR2zRR4Ami7z5A+kasMnFlfaTGvlCAISpE+PsaLRnI88c1AhMCIC6pPWNCmebmDtCI1o M8LeAoWJklwQtiX75tNuxQFXoPWrAE2WSo/VgAJLW9hsXJafzUxl32MEIILcLQwq+O9l duR0oKDJ90Wht9vb1g7Kiw6hc0yAzoSHmLtDWER4IRCe8IpUEHbo5e5i3hjTZPq7yu/m /AJaamt8XkMWXDjp4TqGjmxcGtRfdmXGhuNoAQ3kX/H3pW6o7LCBVx3P+4ze2fxTILDN 3M/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=AYfjMIA9; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs41-20020a1709072d2900b0078de536a3cdsi21318333ejc.119.2022.10.21.09.58.56; Fri, 21 Oct 2022 09:59:22 -0700 (PDT) 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=pass header.i=@paragon-software.com header.s=mail header.b=AYfjMIA9; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbiJUQxP (ORCPT + 99 others); Fri, 21 Oct 2022 12:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbiJUQxM (ORCPT ); Fri, 21 Oct 2022 12:53:12 -0400 Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430A228C31E; Fri, 21 Oct 2022 09:53:08 -0700 (PDT) Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id 734F32201; Fri, 21 Oct 2022 16:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1666371028; bh=d0P/O+Kp+C+ez1qFGFR5y9BK+bKwVlzJw6ae9PLolSM=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=AYfjMIA9L2KLwAun2Hkba60Oxx3kY9AoQZHIVEE56wUtfe7sM0KRRd6pr11wUCluk /+7UAeTeQQX0SJWuDlDvgTuHFhYAm26ykejFtbm5eu5X5VE6eqSOwGiBKSUZIxDVcZ 1NxDhZxhZ2AE+UcowsS6lWhn9rJxCOB5MdpByo4c= Received: from [172.30.8.65] (172.30.8.65) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 21 Oct 2022 19:53:01 +0300 Message-ID: <118f7c57-2b66-6ac6-f2e8-f1eccff97ea5@paragon-software.com> Date: Fri, 21 Oct 2022 19:53:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: [PATCH 4/4] fs/ntfs3: Simplify ntfs_update_mftmirr function Content-Language: en-US From: Konstantin Komarov To: CC: , References: <9a7d08c2-e503-ac1d-1621-20369c073530@paragon-software.com> In-Reply-To: <9a7d08c2-e503-ac1d-1621-20369c073530@paragon-software.com> X-Originating-IP: [172.30.8.65] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747317227808750899?= X-GMAIL-MSGID: =?utf-8?q?1747317227808750899?= Make err assignment in one place. Signed-off-by: Konstantin Komarov --- fs/ntfs3/fsntfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index 99dc2a287eab..3fe2de74eeaf 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -801,7 +801,6 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) if (!(sbi->flags & NTFS_FLAGS_MFTMIRR)) return; - err = 0; bytes = sbi->mft.recs_mirr << sbi->record_bits; block1 = sbi->mft.lbo >> sb->s_blocksize_bits; block2 = sbi->mft.lbo2 >> sb->s_blocksize_bits; @@ -831,8 +830,7 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) put_bh(bh1); bh1 = NULL; - if (wait) - err = sync_dirty_buffer(bh2); + err = wait ? sync_dirty_buffer(bh2) : 0; put_bh(bh2); if (err)