Commit 0efcd739 authored by Wenchao Hao's avatar Wenchao Hao Committed by Theodore Ts'o

ext4: remove unused parameter biop in ext4_issue_discard()

all caller of ext4_issue_discard() would set biop to NULL since
'commit 55cdd0af ("ext4: get discard out of jbd2 commit kthread
contex")', it's unnecessary to keep this parameter any more.
Signed-off-by: default avatarWenchao Hao <haowenchao2@huawei.com>
Reviewed-by: default avatarRitesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20240226081731.3224470-1-haowenchao2@huawei.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 70862373
...@@ -3832,8 +3832,7 @@ void ext4_mb_release(struct super_block *sb) ...@@ -3832,8 +3832,7 @@ void ext4_mb_release(struct super_block *sb)
} }
static inline int ext4_issue_discard(struct super_block *sb, static inline int ext4_issue_discard(struct super_block *sb,
ext4_group_t block_group, ext4_grpblk_t cluster, int count, ext4_group_t block_group, ext4_grpblk_t cluster, int count)
struct bio **biop)
{ {
ext4_fsblk_t discard_block; ext4_fsblk_t discard_block;
...@@ -3842,13 +3841,8 @@ static inline int ext4_issue_discard(struct super_block *sb, ...@@ -3842,13 +3841,8 @@ static inline int ext4_issue_discard(struct super_block *sb,
count = EXT4_C2B(EXT4_SB(sb), count); count = EXT4_C2B(EXT4_SB(sb), count);
trace_ext4_discard_blocks(sb, trace_ext4_discard_blocks(sb,
(unsigned long long) discard_block, count); (unsigned long long) discard_block, count);
if (biop) {
return __blkdev_issue_discard(sb->s_bdev, return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0);
(sector_t)discard_block << (sb->s_blocksize_bits - 9),
(sector_t)count << (sb->s_blocksize_bits - 9),
GFP_NOFS, biop);
} else
return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0);
} }
static void ext4_free_data_in_buddy(struct super_block *sb, 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, ...@@ -6495,7 +6489,7 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode,
} else { } else {
if (test_opt(sb, DISCARD)) { if (test_opt(sb, DISCARD)) {
err = ext4_issue_discard(sb, block_group, bit, err = ext4_issue_discard(sb, block_group, bit,
count_clusters, NULL); count_clusters);
/* /*
* Ignore EOPNOTSUPP error. This is consistent with * Ignore EOPNOTSUPP error. This is consistent with
* what happens when using journal. * what happens when using journal.
...@@ -6752,7 +6746,7 @@ __acquires(bitlock) ...@@ -6752,7 +6746,7 @@ __acquires(bitlock)
*/ */
mb_mark_used(e4b, &ex); mb_mark_used(e4b, &ex);
ext4_unlock_group(sb, group); ext4_unlock_group(sb, group);
ret = ext4_issue_discard(sb, group, start, count, NULL); ret = ext4_issue_discard(sb, group, start, count);
ext4_lock_group(sb, group); ext4_lock_group(sb, group);
mb_free_blocks(NULL, e4b, start, ex.fe_len); mb_free_blocks(NULL, e4b, start, ex.fe_len);
return ret; return ret;
......
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