Remove redundant ocf_io_get()/ocf_io_put() from bottom volume

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2021-11-05 12:48:42 +01:00
parent 5431f83273
commit f909b21276

View File

@ -165,9 +165,6 @@ static void cas_bd_io_end(struct ocf_io *io, int error)
/* Send completion to caller */ /* Send completion to caller */
io->end(io, bdio->error); io->end(io, bdio->error);
/* Free allocated structures */
ocf_io_put(io);
} }
/* /*
@ -213,9 +210,6 @@ static void block_dev_submit_flush(struct ocf_io *io)
/* Prevent races of completing IO */ /* Prevent races of completing IO */
atomic_set(&blkio->rq_remaning, 1); atomic_set(&blkio->rq_remaning, 1);
/* Increase IO reference counter for FLUSH IO */
ocf_io_get(io);
if (q == NULL) { if (q == NULL) {
/* No queue, error */ /* No queue, error */
blkio->error = -EINVAL; blkio->error = -EINVAL;
@ -262,9 +256,6 @@ void block_dev_submit_discard(struct ocf_io *io)
/* Prevent races of completing IO */ /* Prevent races of completing IO */
atomic_set(&blkio->rq_remaning, 1); atomic_set(&blkio->rq_remaning, 1);
/* Increase IO reference counter for FLUSH IO */
ocf_io_get(io);
if (!q) { if (!q) {
/* No queue, error */ /* No queue, error */
blkio->error = -ENXIO; blkio->error = -ENXIO;
@ -385,9 +376,6 @@ static void block_dev_submit_io(struct ocf_io *io)
CAS_DEBUG_PARAM("Address = %llu, bytes = %u\n", bdio->addr, CAS_DEBUG_PARAM("Address = %llu, bytes = %u\n", bdio->addr,
bdio->bytes); bdio->bytes);
/* Increase IO reference */
ocf_io_get(io);
/* Prevent races of completing IO */ /* Prevent races of completing IO */
atomic_set(&bdio->rq_remaning, 1); atomic_set(&bdio->rq_remaning, 1);