On 12/6/24 05:55, Alexander Atanasov wrote:
@@ -1090,9 +1090,9 @@ static int ploop_alloc_cluster(struct ploop *ploop, struct ploop_index_wb *piwb, clu -= piwb->page_id * PAGE_SIZE / sizeof(map_index_t) - PLOOP_MAP_OFFSET;to = piwb->kmpage;- if (to[clu]) { + if (READ_ONCE(to[clu])) { /* Already mapped by one of previous bios */ - *dst_clu = to[clu]; + *dst_clu = READ_ONCE(to[clu]); already_alloced = true; }
The above hunk does not look good, we explicitly do "READ_ONCE(to[clu])" twice, likely that's not what we want.
-- Best regards, Tikhomirov Pavel Senior Software Developer, Virtuozzo. _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
