]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Fix leak of discard bio
authorJan Kara <jack@suse.cz>
Wed, 2 Aug 2017 19:37:16 +0000 (12:37 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 4 Aug 2017 20:43:36 +0000 (13:43 -0700)
commitbd5ca8c574ccfdd0dab94471236d7c5d8e59ebc2
tree9b801f32954a0209ef4fcb7cd7df5300c53838bf
parent77fe4e475cb0a2e75e72ab3476acc14697c369f6
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: e2cc52c976487ad3eb31d5e37f80bd935853b5f5
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>
fs/xfs/xfs_log_cil.c