Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2977045rwi; Fri, 21 Oct 2022 10:00:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+AquYdM5xQUklNGyCQCtnwXLUmrscqgXm9KAYEU2HvcGoUwtlNcwjRCiW+iHbNpICZM+9 X-Received: by 2002:a17:907:9815:b0:78e:4b6:1afb with SMTP id ji21-20020a170907981500b0078e04b61afbmr16314969ejc.291.1666371615039; Fri, 21 Oct 2022 10:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666371615; cv=none; d=google.com; s=arc-20160816; b=BSSlmNFyQ7/otBZf4g0MP9ID6V7jqrvZ3PHI3UrLonpMSTxP7xOXExIUQbMcKn1BOY Zs+H4UCrjAx0YEDF4uvrqH2Sa0r6KF6G5mE9PDDywBRgD6E4QsdDNxlTvRVsYJGxCig0 ElXfktu8c10coGYjQGmYb6dj3IULdfXdotFmK8wgCrHAK6AuybNFd6Kyygq9qyErOW3M h9WDI5rWgxFk0JtscyjSYTFXWYwJ1G410syxkn9VnWZvuPoAE6mxqoD9D4tfKHEwpU4u iL4TgWNj4TfqIoZGfsmYNzHIaoyPP3TJYgco9TRuCZS6wWVIt7QCCxixl+3/xoplpj5x daKQ== 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 Return-Path: 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.59.48; Fri, 21 Oct 2022 10:00:15 -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> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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 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) -- 2.37.0