]> git.baikalelectronics.ru Git - kernel.git/commit
block: missing bio_put following submit_bio_wait
authorShaun Tancheff <shaun@tancheff.com>
Tue, 7 Jun 2016 16:32:13 +0000 (11:32 -0500)
committerJens Axboe <axboe@fb.com>
Tue, 7 Jun 2016 16:47:48 +0000 (10:47 -0600)
commit69aff151f9e06a3d9b1bc8c67e6513c9c62b9ed8
tree4495eb3d9de4c5d24fa38fb972c2038079d797f5
parentd2c0f482f4a69f928e6cdc8f9356dd0b83891df5
block: missing bio_put following submit_bio_wait

submit_bio_wait() gives the caller an opportunity to examine
struct bio and so expects the caller to issue the put_bio()

This fixes a memory leak reported by a few people in 4.7-rc2
kmemleak report after 716d419e9015 ("block: remove struct bio_batch")

Signed-off-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Larry Finger@lwfinger.net
Tested-by: David Drysdale <drysdale@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-lib.c