Re: [dm-devel] [PATCH] dm thin: fix a memory leak when passing discard bio down

2017-04-18 Thread Zdenek Kabelac
Dne 18.4.2017 v 09:27 Dennis Yang napsal(a): dm-thin does not free the discard_parent bio after all chained sub bios finished. The following kmemleak report could be observed after pool with discard_passdown option processes discard bios in linux v4.11-rc7. To fix this, we drop the discard_parent

[dm-devel] [PATCH] dm thin: fix a memory leak when passing discard bio down

2017-04-18 Thread Dennis Yang
dm-thin does not free the discard_parent bio after all chained sub bios finished. The following kmemleak report could be observed after pool with discard_passdown option processes discard bios in linux v4.11-rc7. To fix this, we drop the discard_parent bio reference when its endio (passdown_endio)