From: Daeho Jeong Date: Sat, 5 Aug 2017 17:11:57 +0000 (-0400) Subject: ext4: release discard bio after sending discard commands X-Git-Tag: rel_imx_4.19.35_1.1.0~11993^2~13 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=e45105772db41c5318b2a7ec1c420183183414e3;p=linux.git ext4: release discard bio after sending discard commands We've changed the discard command handling into parallel manner. But, in this change, I forgot decreasing the usage count of the bio which was used to send discard request. I'm sorry about that. Fixes: a015434480dc ("ext4: send parallel discards on commit completions") Signed-off-by: Daeho Jeong Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara --- diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 581e357e8406..8779893d74e5 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2892,8 +2892,10 @@ void ext4_process_freed_data(struct super_block *sb, tid_t commit_tid) break; } - if (discard_bio) + if (discard_bio) { submit_bio_wait(discard_bio); + bio_put(discard_bio); + } } list_for_each_entry_safe(entry, tmp, &freed_data_list, efd_list)