[Devel] [PATCH RHEL8 COMMIT] ploop: Use kmap_atomic() instead of kmap()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jul 19 15:41:31 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.57
------>
commit 949b962dc29cc63754bfefe035b9786e09ec8488
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon Jul 19 15:41:31 2021 +0300
ploop: Use kmap_atomic() instead of kmap()
We need to use kmap_atomic() under write_lock.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index 14e7b06d88b5..b9be80492eae 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -1154,7 +1154,7 @@ static int ploop_check_delta_before_flip(struct ploop *ploop, struct file *file)
write_lock_irq(&ploop->bat_rwlock);
ploop_for_each_md_page(ploop, md, node) {
init_be_iter(size_in_clus, md->id, &i, &end);
- d_bat_entries = kmap(d_md->page);
+ d_bat_entries = kmap_atomic(d_md->page);
for (; i <= end; i++) {
if (md_page_cluster_is_in_top_delta(ploop, md, i) &&
d_bat_entries[i] != BAT_ENTRY_NONE) {
@@ -1170,7 +1170,7 @@ static int ploop_check_delta_before_flip(struct ploop *ploop, struct file *file)
goto unmap;
}
unmap:
- kunmap(d_md->page);
+ kunmap_atomic(d_bat_entries);
if (stop)
break;
d_md = md_next_entry(d_md);
More information about the Devel
mailing list