/* XXX: dmu_object_next() does NOT find dnodes allocated
* in the current non-committed txg, so we force txg
* commit to find all existing dnodes ... */
- txg_wait_synced(dmu_objset_pool(dev->od_os), 0ULL);
+ if (!dev->od_dt_dev.dd_rdonly)
+ txg_wait_synced(dmu_objset_pool(dev->od_os), 0ULL);
RETURN((struct dt_it *)it);
}