lightnvm: pblk: remove unnecessary bio_get/put
authorJavier González <javier@javigon.com>
Fri, 1 Jun 2018 14:41:11 +0000 (16:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Jun 2018 15:02:53 +0000 (09:02 -0600)
commit87cc40bbe3371d0af1a2f31bf90665b55d3d1c0d
treeee39efbe702adc3f1f94d0249914f83b40abf49c
parent4a828884c694dfaf002688b91a102e35d4961a1b
lightnvm: pblk: remove unnecessary bio_get/put

In the read path, pblk gets a reference to the incoming bio and puts it
after ending the bio. Though this behavior is correct, it is unnecessary
since pblk is the one putting the bio, therefore, it cannot disappear
underneath it.

Removing this reference, allows to clean up rqd->bio and avoids pointer
bouncing for the different read paths. Now, the incoming bio always
resides in the read context and pblk's internal bios (if any) reside in
rqd->bio.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-read.c