]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/move.c
Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg()
[bcachefs-tools-debian] / libbcachefs / move.c
index 8eb49381b030942e3b9631f922b204faeb2b0599..1de213506adf738069a99b64b421fbc85b5b13b3 100644 (file)
@@ -92,10 +92,10 @@ next:
 
                if (bch2_snapshot_is_ancestor(c, k.k->p.snapshot, old_pos.snapshot)) {
                        struct bkey_i *update;
-                       size_t i;
+                       u32 *i;
 
-                       for (i = 0; i < s.nr; i++)
-                               if (bch2_snapshot_is_ancestor(c, k.k->p.snapshot, s.d[i]))
+                       darray_for_each(s.ids, i)
+                               if (bch2_snapshot_is_ancestor(c, k.k->p.snapshot, *i))
                                        goto next;
 
                        update = bch2_trans_kmalloc(trans, sizeof(struct bkey_i));
@@ -125,7 +125,7 @@ next:
                }
        }
        bch2_trans_iter_exit(trans, &iter);
-       kfree(s.d);
+       darray_exit(s.ids);
 
        return ret;
 }