Skip to content

Commit

Permalink
Issue openzfs#4116. Move dmu_tx_get_txg after dmu_tx_assign.
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-oe committed Feb 28, 2016
1 parent 39a41a7 commit ea7aa5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ zvol_update_volsize(uint64_t volsize, objset_t *os)
ASSERT(MUTEX_HELD(&zvol_state_lock));

tx = dmu_tx_create(os);
txg = dmu_tx_get_txg(tx);
dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL);
dmu_tx_mark_netfree(tx);
error = dmu_tx_assign(tx, TXG_WAIT);
if (error) {
dmu_tx_abort(tx);
return (SET_ERROR(error));
}
txg = dmu_tx_get_txg(tx);

error = zap_update(os, ZVOL_ZAP_OBJ, "size", 8, 1,
&volsize, tx);
Expand Down

0 comments on commit ea7aa5b

Please sign in to comment.