Commit acc3c879 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Jens Axboe

null_blk: use kmap_local_page() and kunmap_local()

Replace the deprecated API kmap_atomic() and kunmap_atomic() with
kmap_local_page() and kunmap_local() in null_flush_cache_page().
Signed-off-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20230330184926.64209-2-kch@nvidia.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent fbb5615f
...@@ -1030,8 +1030,8 @@ static int null_flush_cache_page(struct nullb *nullb, struct nullb_page *c_page) ...@@ -1030,8 +1030,8 @@ static int null_flush_cache_page(struct nullb *nullb, struct nullb_page *c_page)
if (!t_page) if (!t_page)
return -ENOMEM; return -ENOMEM;
src = kmap_atomic(c_page->page); src = kmap_local_page(c_page->page);
dst = kmap_atomic(t_page->page); dst = kmap_local_page(t_page->page);
for (i = 0; i < PAGE_SECTORS; for (i = 0; i < PAGE_SECTORS;
i += (nullb->dev->blocksize >> SECTOR_SHIFT)) { i += (nullb->dev->blocksize >> SECTOR_SHIFT)) {
...@@ -1043,8 +1043,8 @@ static int null_flush_cache_page(struct nullb *nullb, struct nullb_page *c_page) ...@@ -1043,8 +1043,8 @@ static int null_flush_cache_page(struct nullb *nullb, struct nullb_page *c_page)
} }
} }
kunmap_atomic(dst); kunmap_local(dst);
kunmap_atomic(src); kunmap_local(src);
ret = radix_tree_delete_item(&nullb->dev->cache, idx, c_page); ret = radix_tree_delete_item(&nullb->dev->cache, idx, c_page);
null_free_page(ret); null_free_page(ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment