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

ext4: remove unused parameter biop in ext4_issue_discard()

all caller of ext4_issue_discard() would set biop to NULL since
'commit 55cdd0af2bc5 ("ext4: get discard out of jbd2 commit kthread
contex")', it's unnecessary to keep this parameter any more.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20240226081731.3224470-1-haowenchao2@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Wenchao Hao and committed by
Theodore Ts'o
0efcd739 70862373

+5 -11
+5 -11
fs/ext4/mballoc.c
··· 3832 3832 } 3833 3833 3834 3834 static inline int ext4_issue_discard(struct super_block *sb, 3835 - ext4_group_t block_group, ext4_grpblk_t cluster, int count, 3836 - struct bio **biop) 3835 + ext4_group_t block_group, ext4_grpblk_t cluster, int count) 3837 3836 { 3838 3837 ext4_fsblk_t discard_block; 3839 3838 ··· 3841 3842 count = EXT4_C2B(EXT4_SB(sb), count); 3842 3843 trace_ext4_discard_blocks(sb, 3843 3844 (unsigned long long) discard_block, count); 3844 - if (biop) { 3845 - return __blkdev_issue_discard(sb->s_bdev, 3846 - (sector_t)discard_block << (sb->s_blocksize_bits - 9), 3847 - (sector_t)count << (sb->s_blocksize_bits - 9), 3848 - GFP_NOFS, biop); 3849 - } else 3850 - return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0); 3845 + 3846 + return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0); 3851 3847 } 3852 3848 3853 3849 static void ext4_free_data_in_buddy(struct super_block *sb, ··· 6489 6495 } else { 6490 6496 if (test_opt(sb, DISCARD)) { 6491 6497 err = ext4_issue_discard(sb, block_group, bit, 6492 - count_clusters, NULL); 6498 + count_clusters); 6493 6499 /* 6494 6500 * Ignore EOPNOTSUPP error. This is consistent with 6495 6501 * what happens when using journal. ··· 6746 6752 */ 6747 6753 mb_mark_used(e4b, &ex); 6748 6754 ext4_unlock_group(sb, group); 6749 - ret = ext4_issue_discard(sb, group, start, count, NULL); 6755 + ret = ext4_issue_discard(sb, group, start, count); 6750 6756 ext4_lock_group(sb, group); 6751 6757 mb_free_blocks(NULL, e4b, start, ex.fe_len); 6752 6758 return ret;