Merge pull request #610 from loyou/open-cas-linux-issue-1015

Fix incorrect page count calculation with large PAGE_SIZE
This commit is contained in:
Robert Baldyga 2021-12-14 16:02:38 +01:00 committed by GitHub
commit ee92a0fe7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ static struct ocf_request *_ocf_cleaner_alloc_req(struct ocf_cache *cache,
/* Allocate pages for cleaning IO */
req->data = ctx_data_alloc(cache->owner,
ocf_line_size(cache) / PAGE_SIZE * count);
OCF_DIV_ROUND_UP((uint64_t)count * ocf_line_size(cache), PAGE_SIZE));
if (!req->data) {
ocf_req_put(req);
return NULL;