]> 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)
commit7c86bc96f47c01f9bc041b1d84c9ab85b5f4adf3
treeee39efbe702adc3f1f94d0249914f83b40abf49c
parent99bbf75a47f6f5a93ce870bf6aa976db74904312
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