]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb32f5bcb8236957ab5ac04574ae673dbff4ed2d1
treeee39efbe702adc3f1f94d0249914f83b40abf49c
parent42d66ae2978d179a604f7277fe280924aaf5aec9
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