Remove io.ref_count

There is already refcounting on the request. No need for additional one.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Robert Baldyga 2024-10-14 21:29:03 +02:00
parent 85513332d7
commit 0cf4e8124b
2 changed files with 1 additions and 12 deletions

View File

@ -89,7 +89,6 @@ ocf_io_t ocf_io_new(ocf_volume_t volume, ocf_queue_t queue,
return NULL; return NULL;
} }
env_atomic_set(&req->io.ref_count, 1);
req->io.volume = volume; req->io.volume = volume;
req->io.io_class = io_class; req->io.io_class = io_class;
req->flags = flags; req->flags = flags;
@ -128,12 +127,7 @@ uint32_t ocf_io_get_offset(ocf_io_t io)
void ocf_io_put(ocf_io_t io) void ocf_io_put(ocf_io_t io)
{ {
struct ocf_request *req = ocf_io_to_req(io); struct ocf_request *req = ocf_io_to_req(io);
struct ocf_volume *volume; struct ocf_volume *volume = req->io.volume;
if (env_atomic_dec_return(&req->io.ref_count))
return;
volume = req->io.volume;
ocf_io_allocator_del(&volume->type->allocator, (void *)req); ocf_io_allocator_del(&volume->type->allocator, (void *)req);

View File

@ -129,11 +129,6 @@ struct ocf_request_io {
*/ */
uint8_t io_class; uint8_t io_class;
/**
* @brief OCF IO reference count
*/
env_atomic ref_count;
/** /**
* @brief Front volume handle * @brief Front volume handle
*/ */