Skip to content

Commit f31076a

Browse files
EngAlaaSolimanBoris Ostrovsky
authored andcommitted
xen: Convert kmap() to kmap_local_page()
kmap() is being deprecated and these usages are all local to the thread so there is no reason kmap_local_page() can't be used. Replace kmap() calls with kmap_local_page(). Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20220419234328.10346-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
1 parent 262fc47 commit f31076a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/xen/gntalloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ static void __del_gref(struct gntalloc_gref *gref)
178178
unsigned long addr;
179179

180180
if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
181-
uint8_t *tmp = kmap(gref->page);
181+
uint8_t *tmp = kmap_local_page(gref->page);
182182
tmp[gref->notify.pgoff] = 0;
183-
kunmap(gref->page);
183+
kunmap_local(tmp);
184184
}
185185
if (gref->notify.flags & UNMAP_NOTIFY_SEND_EVENT) {
186186
notify_remote_via_evtchn(gref->notify.event);

0 commit comments

Comments
 (0)