Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

exfat: drop redundant sec parameter from exfat_mirror_bh

The sector offset can be obtained from bh->b_blocknr, so drop the
redundant sec parameter from exfat_mirror_bh(). Also clean up the
function to use exfat_update_bh() helper.

No functional changes.

Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>

authored by

Chi Zhiling and committed by
Namjae Jeon
63193eb4 7094b09e

+4 -7
+4 -7
fs/exfat/fatent.c
··· 11 11 #include "exfat_raw.h" 12 12 #include "exfat_fs.h" 13 13 14 - static int exfat_mirror_bh(struct super_block *sb, sector_t sec, 15 - struct buffer_head *bh) 14 + static int exfat_mirror_bh(struct super_block *sb, struct buffer_head *bh) 16 15 { 17 16 struct buffer_head *c_bh; 18 17 struct exfat_sb_info *sbi = EXFAT_SB(sb); 18 + sector_t sec = bh->b_blocknr; 19 19 sector_t sec2; 20 20 int err = 0; 21 21 ··· 25 25 if (!c_bh) 26 26 return -ENOMEM; 27 27 memcpy(c_bh->b_data, bh->b_data, sb->s_blocksize); 28 - set_buffer_uptodate(c_bh); 29 - mark_buffer_dirty(c_bh); 30 - if (sb->s_flags & SB_SYNCHRONOUS) 31 - err = sync_dirty_buffer(c_bh); 28 + exfat_update_bh(c_bh, sb->s_flags & SB_SYNCHRONOUS); 32 29 brelse(c_bh); 33 30 } 34 31 ··· 80 83 fat_entry = (__le32 *)&(bh->b_data[off]); 81 84 *fat_entry = cpu_to_le32(content); 82 85 exfat_update_bh(bh, sb->s_flags & SB_SYNCHRONOUS); 83 - exfat_mirror_bh(sb, sec, bh); 86 + exfat_mirror_bh(sb, bh); 84 87 brelse(bh); 85 88 return 0; 86 89 }