[Devel] [RFC PATCH vz9 v6 41/62] dm-ploop: fix access to batpages to use WRITE_ONCE
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Fri Dec 6 00:56:14 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 836b7f1b9e21..6192ddca3693 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -828,7 +828,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