forked from luck/tmp_suning_uos_patched
xfs: Fix leak of discard bio
The bio describing discard operation is allocated by
__blkdev_issue_discard() which returns us a reference to it. That
reference is never released and thus we leak this bio. Drop the bio
reference once it completes in xlog_discard_endio().
CC: stable@vger.kernel.org
Fixes: 4560e78f40
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
5b094d6dac
commit
ea7bd56fa3
|
@ -539,6 +539,7 @@ xlog_discard_endio(
|
|||
|
||||
INIT_WORK(&ctx->discard_endio_work, xlog_discard_endio_work);
|
||||
queue_work(xfs_discard_wq, &ctx->discard_endio_work);
|
||||
bio_put(bio);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue
Block a user