Merge pull request #30 from robertbaldyga/more-missing-io-puts

Add more missing io_put() calls
This commit is contained in:
Michal Rakowski 2019-01-04 13:15:35 +01:00 committed by GitHub
commit cbc590e668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -56,6 +56,8 @@ static void _ocf_discard_core_complete(struct ocf_io *io, int error)
OCF_DEBUG_RQ(req, "Core DISCARD Completion");
_ocf_discard_complete_req(req, error);
ocf_io_put(io);
}
static int _ocf_discard_core(struct ocf_request *req)
@ -88,11 +90,14 @@ static void _ocf_discard_cache_flush_complete(struct ocf_io *io, int error)
if (error) {
ocf_metadata_error(req->cache);
_ocf_discard_complete_req(req, error);
ocf_io_put(io);
return;
}
req->io_if = &_io_if_discard_core;
ocf_engine_push_req_front(req, true);
ocf_io_put(io);
}
static int _ocf_discard_flush_cache(struct ocf_request *req)

View File

@ -267,6 +267,8 @@ static void _ocf_cleaner_flush_cache_io_end(struct ocf_io *io, int error)
OCF_DEBUG_MSG(req->cache, "Cache flush finished");
_ocf_cleaner_finish_req(req);
ocf_io_put(io);
}
static int _ocf_cleaner_fire_flush_cache(struct ocf_request *req)