diff options
author | 2017-08-02 12:37:16 -0700 | |
---|---|---|
committer | 2017-08-04 13:43:36 -0700 | |
commit | ea7bd56fa309d10a41b1041827a63c0746c47554 (patch) | |
tree | 9b801f32954a0209ef4fcb7cd7df5300c53838bf /fs/xfs/xfs_log_cil.c | |
parent | xfs: fix multi-AG deadlock in xfs_bunmapi (diff) | |
download | linux-ea7bd56fa309d10a41b1041827a63c0746c47554.tar.gz linux-ea7bd56fa309d10a41b1041827a63c0746c47554.tar.bz2 linux-ea7bd56fa309d10a41b1041827a63c0746c47554.zip |
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: 4560e78f40cb55bd2ea8f1ef4001c5baa88531c7
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>
Diffstat (limited to 'fs/xfs/xfs_log_cil.c')
-rw-r--r-- | fs/xfs/xfs_log_cil.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index fbe72b134bef..43aa42a3a5d3 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c @@ -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 |