Skip to content

Commit ba11892

Browse files
fs/ntfs3: Simplify ntfs_update_mftmirr function
Make err assignment in one place. Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 3929042 commit ba11892

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/ntfs3/fsntfs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
825825
if (!(sbi->flags & NTFS_FLAGS_MFTMIRR))
826826
return;
827827

828-
err = 0;
829828
bytes = sbi->mft.recs_mirr << sbi->record_bits;
830829
block1 = sbi->mft.lbo >> sb->s_blocksize_bits;
831830
block2 = sbi->mft.lbo2 >> sb->s_blocksize_bits;
@@ -855,8 +854,7 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
855854
put_bh(bh1);
856855
bh1 = NULL;
857856

858-
if (wait)
859-
err = sync_dirty_buffer(bh2);
857+
err = wait ? sync_dirty_buffer(bh2) : 0;
860858

861859
put_bh(bh2);
862860
if (err)

0 commit comments

Comments
 (0)