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:
parent
85513332d7
commit
0cf4e8124b
@ -89,7 +89,6 @@ ocf_io_t ocf_io_new(ocf_volume_t volume, ocf_queue_t queue,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env_atomic_set(&req->io.ref_count, 1);
|
||||
req->io.volume = volume;
|
||||
req->io.io_class = io_class;
|
||||
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)
|
||||
{
|
||||
struct ocf_request *req = ocf_io_to_req(io);
|
||||
struct ocf_volume *volume;
|
||||
|
||||
if (env_atomic_dec_return(&req->io.ref_count))
|
||||
return;
|
||||
|
||||
volume = req->io.volume;
|
||||
struct ocf_volume *volume = req->io.volume;
|
||||
|
||||
ocf_io_allocator_del(&volume->type->allocator, (void *)req);
|
||||
|
||||
|
@ -129,11 +129,6 @@ struct ocf_request_io {
|
||||
*/
|
||||
uint8_t io_class;
|
||||
|
||||
/**
|
||||
* @brief OCF IO reference count
|
||||
*/
|
||||
env_atomic ref_count;
|
||||
|
||||
/**
|
||||
* @brief Front volume handle
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user