int idx = bch2_replicas_entry_idx(c, r);
 
        BUG_ON(idx < 0);
-       BUG_ON(!sectors);
 
        switch (r->data_type) {
        case BCH_DATA_BTREE:
 {
        struct replicas_delta_list *d;
        struct replicas_delta *n;
-       unsigned b = replicas_entry_bytes(r) + 8;
+       unsigned b;
+
+       if (!sectors)
+               return;
 
+       b = replicas_entry_bytes(r) + 8;
        d = replicas_deltas_realloc(trans, b);
 
        n = (void *) d->d + d->used;
                                        fs_usage, journal_seq, flags);
 
                if (p.ptr.cached) {
-                       if (disk_sectors && !stale)
+                       if (!stale)
                                update_cached_sectors(c, fs_usage, p.ptr.dev,
                                                      disk_sectors);
                } else if (!p.ec_nr) {
                }
        }
 
-       if (dirty_sectors)
-               update_replicas(c, fs_usage, &r.e, dirty_sectors);
+       update_replicas(c, fs_usage, &r.e, dirty_sectors);
 
        return 0;
 }
                        ? sectors
                        : ptr_disk_sectors_delta(p, offset, sectors, flags);
 
-               /*
-                * can happen due to rounding with compressed extents:
-                */
-               if (!disk_sectors)
-                       continue;
-
                ret = bch2_trans_mark_pointer(trans, p, disk_sectors,
                                              data_type);
                if (ret < 0)
                stale = ret > 0;
 
                if (p.ptr.cached) {
-                       if (disk_sectors && !stale)
+                       if (!stale)
                                update_cached_sectors_list(trans, p.ptr.dev,
                                                           disk_sectors);
                } else if (!p.ec_nr) {
                }
        }
 
-       if (dirty_sectors)
-               update_replicas_list(trans, &r.e, dirty_sectors);
+       update_replicas_list(trans, &r.e, dirty_sectors);
 
        return 0;
 }