There is no need to call cond_resched() in ext4_trim_all_free() since blkdev_issue_discard() already takes care of that. So just remove it. Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> --- fs/ext4/mballoc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 354dc1a..4879766 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -5163,12 +5163,6 @@ ext4_trim_all_free(struct super_block *sb, ext4_group_t group, break; } - if (need_resched()) { - ext4_unlock_group(sb, group); - cond_resched(); - ext4_lock_group(sb, group); - } - if ((e4b.bd_info->bb_free - free_count) < minblocks) break; } -- 2.7.4