]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: free padded entries in write buffer
authorJavier González <javier@cnexlabs.com>
Fri, 13 Oct 2017 12:46:03 +0000 (14:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Oct 2017 14:34:57 +0000 (08:34 -0600)
commit629cb6890802aa29bac7650b108085df8ecf406b
treee9570b8beb9c4750199de7b40769546321a5eb93
parent8a71a19cf0bf734e27f9003d02e03a8926e039e8
lightnvm: pblk: free padded entries in write buffer

When a REQ_FLUSH reaches pblk, the bio cannot be directly completed.
Instead, data on the write buffer is flushed and the bio is completed on
the completion pah. This might require some sectors to be padded in
order to guarantee a successful write.

This patch fixes a memory leak on the padded pages. A consequence of
this bad free was that internal bios not containing data (only a flush)
were not being completed.

Fixes: 666397e18deb ("lightnvm: physical block device (pblk) target")
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-core.c
drivers/lightnvm/pblk-write.c