Message ID | 20240314132843.24069-1-flyingpeng@tencent.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] xen/blkback: use kmap_local_page() | expand |
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.
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; }