* [PATCH v2] xen/blkback: use kmap_local_page()
@ 2024-03-14 13:28 flyingpenghao
2024-03-14 14:19 ` Roger Pau Monné
0 siblings, 1 reply; 2+ messages in thread
From: flyingpenghao @ 2024-03-14 13:28 UTC (permalink / raw)
To: roger.pau; +Cc: xen-devel, Peng Hao
From: Peng Hao <flyingpeng@tencent.com>
Use kmap_local_page() instead of kmap_atomic() which has been
deprecated.
Signed-off-by: Peng Hao <flyingpeng@tencent.com>
---
drivers/block/xen-blkback/blkback.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 4defd7f387c7..09503e269842 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -937,8 +937,8 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req,
if ((n % SEGS_PER_INDIRECT_FRAME) == 0) {
/* Map indirect segments */
if (segments)
- kunmap_atomic(segments);
- segments = kmap_atomic(pages[n/SEGS_PER_INDIRECT_FRAME]->page);
+ kunmap_local(segments);
+ segments = kmap_local_page(pages[n/SEGS_PER_INDIRECT_FRAME]->page);
}
i = n % SEGS_PER_INDIRECT_FRAME;
@@ -958,7 +958,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req,
unmap:
if (segments)
- kunmap_atomic(segments);
+ kunmap_local(segments);
xen_blkbk_unmap(ring, pages, indirect_grefs);
return rc;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] xen/blkback: use kmap_local_page()
2024-03-14 13:28 [PATCH v2] xen/blkback: use kmap_local_page() flyingpenghao
@ 2024-03-14 14:19 ` Roger Pau Monné
0 siblings, 0 replies; 2+ messages in thread
From: Roger Pau Monné @ 2024-03-14 14:19 UTC (permalink / raw)
To: flyingpenghao; +Cc: xen-devel, Peng Hao
On Thu, Mar 14, 2024 at 09:28:43PM +0800, flyingpenghao@gmail.com wrote:
> From: Peng Hao <flyingpeng@tencent.com>
>
> Use kmap_local_page() instead of kmap_atomic() which has been
> deprecated.
>
> Signed-off-by: Peng Hao <flyingpeng@tencent.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Thanks, Roger.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-14 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-14 13:28 [PATCH v2] xen/blkback: use kmap_local_page() flyingpenghao
2024-03-14 14:19 ` Roger Pau Monné
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.