unsigned i;
if (!drop && ob->ec) {
+ unsigned nr_blocks;
+
mutex_lock(&ob->ec->lock);
- for (i = 0; i < ob->ec->new_stripe.key.v.nr_blocks; i++) {
+ nr_blocks = bkey_i_to_stripe(&ob->ec->new_stripe.key)->v.nr_blocks;
+
+ for (i = 0; i < nr_blocks; i++) {
if (!ob->ec->blocks[i])
continue;