From: Ma Wupeng mawupeng1@huawei.com
euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7WLVX
---------------------------------------------
Change variable name gm_page to gm_mapping to fit type.
Signed-off-by: Ma Wupeng mawupeng1@huawei.com --- drivers/remote_pager/msg_handler_origin.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/remote_pager/msg_handler_origin.c b/drivers/remote_pager/msg_handler_origin.c index 59801560fe55..d56d94842fc5 100644 --- a/drivers/remote_pager/msg_handler_origin.c +++ b/drivers/remote_pager/msg_handler_origin.c @@ -289,7 +289,7 @@ int gmem_handle_evict_page(struct rpg_kmsg_message *msg) struct vm_area_struct *vma; struct page *page; dma_addr_t dma_addr; - gm_mapping_t *gm_page; + gm_mapping_t *gm_mapping; struct device *dma_dev; struct gm_fault_t gmf; struct svm_proc *proc; @@ -338,22 +338,22 @@ int gmem_handle_evict_page(struct rpg_kmsg_message *msg) goto put_mm; }
- gm_page = vm_object_lookup(vma->vm_obj, addr); - if (!gm_page) { + gm_mapping = vm_object_lookup(vma->vm_obj, addr); + if (!gm_mapping) { pr_err("evictim gm_page is NULL\n"); ret = -EINVAL; goto put_mm; }
- mutex_lock(&gm_page->lock); - if (gm_mapping_willneed(gm_page)) { + mutex_lock(&gm_mapping->lock); + if (gm_mapping_willneed(gm_mapping)) { pr_info("gmem: racing with prefetch or willneed so cancel evict\n"); - clear_gm_mapping_willneed(gm_page); + clear_gm_mapping_willneed(gm_mapping); ret = -EINVAL; goto unlock; }
- if (!gm_mapping_device(gm_page)) { + if (!gm_mapping_device(gm_mapping)) { pr_info("gmem: page is not in device\n"); ret = -EINVAL; goto unlock; @@ -372,9 +372,9 @@ int gmem_handle_evict_page(struct rpg_kmsg_message *msg) goto unlock; }
- dma_dev = gm_page->dev->dma_dev; + dma_dev = gm_mapping->dev->dma_dev; dma_addr = dma_map_page(dma_dev, page, 0, size, DMA_BIDIRECTIONAL); - gmf.dev = gm_page->dev; + gmf.dev = gm_mapping->dev; gmf.dma_addr = dma_addr;
ret = gmem_unmap(&gmf); @@ -385,10 +385,10 @@ int gmem_handle_evict_page(struct rpg_kmsg_message *msg) goto unlock; }
- set_gm_mapping_host(gm_page, page); + set_gm_mapping_host(gm_mapping, page);
unlock: - mutex_unlock(&gm_page->lock); + mutex_unlock(&gm_mapping->lock); put_mm: mmput(mm); put_task: