Skip to content

Commit 0efcd73

Browse files
wenchao-haotytso
authored andcommitted
ext4: remove unused parameter biop in ext4_issue_discard()
all caller of ext4_issue_discard() would set biop to NULL since 'commit 55cdd0a ("ext4: get discard out of jbd2 commit kthread contex")', it's unnecessary to keep this parameter any more. Signed-off-by: Wenchao Hao <[email protected]> Reviewed-by: Ritesh Harjani (IBM) <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 7086237 commit 0efcd73

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

fs/ext4/mballoc.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3832,8 +3832,7 @@ void ext4_mb_release(struct super_block *sb)
38323832
}
38333833

38343834
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)
38373836
{
38383837
ext4_fsblk_t discard_block;
38393838

@@ -3842,13 +3841,8 @@ static inline int ext4_issue_discard(struct super_block *sb,
38423841
count = EXT4_C2B(EXT4_SB(sb), count);
38433842
trace_ext4_discard_blocks(sb,
38443843
(unsigned long long) discard_block, count);
3845-
if (biop) {
3846-
return __blkdev_issue_discard(sb->s_bdev,
3847-
(sector_t)discard_block << (sb->s_blocksize_bits - 9),
3848-
(sector_t)count << (sb->s_blocksize_bits - 9),
3849-
GFP_NOFS, biop);
3850-
} else
3851-
return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0);
3844+
3845+
return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0);
38523846
}
38533847

38543848
static void ext4_free_data_in_buddy(struct super_block *sb,
@@ -6495,7 +6489,7 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode,
64956489
} else {
64966490
if (test_opt(sb, DISCARD)) {
64976491
err = ext4_issue_discard(sb, block_group, bit,
6498-
count_clusters, NULL);
6492+
count_clusters);
64996493
/*
65006494
* Ignore EOPNOTSUPP error. This is consistent with
65016495
* what happens when using journal.
@@ -6752,7 +6746,7 @@ __acquires(bitlock)
67526746
*/
67536747
mb_mark_used(e4b, &ex);
67546748
ext4_unlock_group(sb, group);
6755-
ret = ext4_issue_discard(sb, group, start, count, NULL);
6749+
ret = ext4_issue_discard(sb, group, start, count);
67566750
ext4_lock_group(sb, group);
67576751
mb_free_blocks(NULL, e4b, start, ex.fe_len);
67586752
return ret;

0 commit comments

Comments
 (0)