diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 2f374b3d2030..4cffeb258398 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -785,7 +785,8 @@ zvol_write(void *arg) if (bytes > volsize - off) /* don't write past the end */ bytes = volsize - off; - dmu_tx_hold_write(tx, ZVOL_OBJ, off, bytes); + dmu_tx_hold_write_by_dnode(tx, zv->zv_dn, off, bytes); + /* This will only fail for ENOSPC */ error = dmu_tx_assign(tx, TXG_WAIT);