[Devel] [RFC PATCH vz9 v5 42/49] dm-ploop: fix access to batpages to use WRITE_ONCE
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Mon Nov 18 09:25:09 MSK 2024
This was missed in an earlier patch and i've actually had a crash here.
https://virtuozzo.atlassian.net/browse/VSTOR-91821
Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index ab87f67537f5..bf71572ca612 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -837,7 +837,7 @@ static void ploop_advance_local_after_bat_wb(struct ploop *ploop,
continue;
if (success) {
- bat_entries[i] = READ_ONCE(dst_clu[i]);
+ WRITE_ONCE(bat_entries[i], READ_ONCE(dst_clu[i]));
WRITE_ONCE(md->bat_levels[i], ploop_top_level(ploop));
} else {
ploop_hole_set_bit(i + off, ploop);
--
2.43.0
More information about the Devel
mailing list