Commit e66af07c authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Konstantin Komarov

fs/ntfs3: Make ntfs_update_mftmirr return void

None of callers check the return value of ntfs_update_mftmirr(), so make
it return void to make code simpler.
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 321460ca
...@@ -827,7 +827,7 @@ int ntfs_refresh_zone(struct ntfs_sb_info *sbi) ...@@ -827,7 +827,7 @@ int ntfs_refresh_zone(struct ntfs_sb_info *sbi)
/* /*
* ntfs_update_mftmirr - Update $MFTMirr data. * ntfs_update_mftmirr - Update $MFTMirr data.
*/ */
int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
{ {
int err; int err;
struct super_block *sb = sbi->sb; struct super_block *sb = sbi->sb;
...@@ -836,12 +836,12 @@ int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) ...@@ -836,12 +836,12 @@ int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
u32 bytes; u32 bytes;
if (!sb) if (!sb)
return -EINVAL; return;
blocksize = sb->s_blocksize; blocksize = sb->s_blocksize;
if (!(sbi->flags & NTFS_FLAGS_MFTMIRR)) if (!(sbi->flags & NTFS_FLAGS_MFTMIRR))
return 0; return;
err = 0; err = 0;
bytes = sbi->mft.recs_mirr << sbi->record_bits; bytes = sbi->mft.recs_mirr << sbi->record_bits;
...@@ -852,16 +852,13 @@ int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) ...@@ -852,16 +852,13 @@ int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
struct buffer_head *bh1, *bh2; struct buffer_head *bh1, *bh2;
bh1 = sb_bread(sb, block1++); bh1 = sb_bread(sb, block1++);
if (!bh1) { if (!bh1)
err = -EIO; return;
goto out;
}
bh2 = sb_getblk(sb, block2++); bh2 = sb_getblk(sb, block2++);
if (!bh2) { if (!bh2) {
put_bh(bh1); put_bh(bh1);
err = -EIO; return;
goto out;
} }
if (buffer_locked(bh2)) if (buffer_locked(bh2))
...@@ -881,13 +878,10 @@ int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) ...@@ -881,13 +878,10 @@ int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
put_bh(bh2); put_bh(bh2);
if (err) if (err)
goto out; return;
} }
sbi->flags &= ~NTFS_FLAGS_MFTMIRR; sbi->flags &= ~NTFS_FLAGS_MFTMIRR;
out:
return err;
} }
/* /*
......
...@@ -593,7 +593,7 @@ int ntfs_look_free_mft(struct ntfs_sb_info *sbi, CLST *rno, bool mft, ...@@ -593,7 +593,7 @@ int ntfs_look_free_mft(struct ntfs_sb_info *sbi, CLST *rno, bool mft,
void ntfs_mark_rec_free(struct ntfs_sb_info *sbi, CLST rno); void ntfs_mark_rec_free(struct ntfs_sb_info *sbi, CLST rno);
int ntfs_clear_mft_tail(struct ntfs_sb_info *sbi, size_t from, size_t to); int ntfs_clear_mft_tail(struct ntfs_sb_info *sbi, size_t from, size_t to);
int ntfs_refresh_zone(struct ntfs_sb_info *sbi); int ntfs_refresh_zone(struct ntfs_sb_info *sbi);
int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait); void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait);
enum NTFS_DIRTY_FLAGS { enum NTFS_DIRTY_FLAGS {
NTFS_DIRTY_CLEAR = 0, NTFS_DIRTY_CLEAR = 0,
NTFS_DIRTY_DIRTY = 1, NTFS_DIRTY_DIRTY = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment