lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 21 Oct 2022 19:53:01 +0300
From:   Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
To:     <ntfs3@...ts.linux.dev>
CC:     <linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>
Subject: [PATCH 4/4] fs/ntfs3: Simplify ntfs_update_mftmirr function

Make err assignment in one place.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
---
  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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ