md->status bits are protected by ploop->bat_lock, md->md_lock is used to protect in-memory BAT copy, md->wait_llist in particular.
Fixes: 1a12832fd864 ("dm-ploop: fix resize and grow to use the new way of updating md pages") Found while working on https://virtuozzo.atlassian.net/browse/VSTOR-107975 Signed-off-by: Konstantin Khorenko <khore...@virtuozzo.com> Feature: dm-ploop: ploop target driver --- drivers/md/dm-ploop-map.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c index 5a2ef5691405..0b4558479f09 100644 --- a/drivers/md/dm-ploop-map.c +++ b/drivers/md/dm-ploop-map.c @@ -2728,16 +2728,13 @@ int ploop_prepare_reloc_index_wb(struct ploop *ploop, err = -EIO; spin_lock_irq(&ploop->bat_lock); - spin_lock(&md->md_lock); /* Keep this test to be the same as in delay_if_md_busy */ if (test_bit(MD_WRITEBACK, &md->status) || test_bit(MD_UPDATING, &md->status)) { err = -EBUSY; - spin_unlock(&md->md_lock); goto out_error; } else { set_bit(MD_UPDATING, &md->status); } - spin_unlock(&md->md_lock); err = ploop_prepare_bat_update(ploop, md, type); if (err) -- 2.43.5 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel