Merge pull request #163 from robertbaldyga/put-queue-after-deallocating-req

Put queue after deallocating request
This commit is contained in:
Michal Rakowski 2019-05-23 10:38:13 +02:00 committed by GitHub
commit 4216ff78f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,12 +263,11 @@ void ocf_req_get(struct ocf_request *req)
void ocf_req_put(struct ocf_request *req)
{
env_allocator *allocator;
ocf_queue_t queue = req->io_queue;
if (env_atomic_dec_return(&req->ref_count))
return;
ocf_queue_put(req->io_queue);
OCF_DEBUG_TRACE(req->cache);
if (!req->d2c && req->io_queue != req->cache->mngt_queue)
@ -282,6 +281,8 @@ void ocf_req_put(struct ocf_request *req)
env_free(req->map);
env_allocator_del(_ocf_req_get_allocator_1(req->cache), req);
}
ocf_queue_put(queue);
}
void ocf_req_clear_info(struct ocf_request *req)