From f909b212768abee6ff4604c5a7faff6106c1b199 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 5 Nov 2021 12:48:42 +0100 Subject: [PATCH] Remove redundant ocf_io_get()/ocf_io_put() from bottom volume Signed-off-by: Robert Baldyga --- modules/cas_cache/volume/vol_block_dev_bottom.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/modules/cas_cache/volume/vol_block_dev_bottom.c b/modules/cas_cache/volume/vol_block_dev_bottom.c index d24dd60..6258e50 100644 --- a/modules/cas_cache/volume/vol_block_dev_bottom.c +++ b/modules/cas_cache/volume/vol_block_dev_bottom.c @@ -165,9 +165,6 @@ static void cas_bd_io_end(struct ocf_io *io, int error) /* Send completion to caller */ 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 */ atomic_set(&blkio->rq_remaning, 1); - /* Increase IO reference counter for FLUSH IO */ - ocf_io_get(io); - if (q == NULL) { /* No queue, error */ blkio->error = -EINVAL; @@ -262,9 +256,6 @@ void block_dev_submit_discard(struct ocf_io *io) /* Prevent races of completing IO */ atomic_set(&blkio->rq_remaning, 1); - /* Increase IO reference counter for FLUSH IO */ - ocf_io_get(io); - if (!q) { /* No queue, error */ 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, bdio->bytes); - /* Increase IO reference */ - ocf_io_get(io); - /* Prevent races of completing IO */ atomic_set(&bdio->rq_remaning, 1);