summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_tx.c
diff options
context:
space:
mode:
authorDon Brady <[email protected]>2017-11-04 14:25:13 -0600
committerBrian Behlendorf <[email protected]>2017-11-04 13:25:13 -0700
commit1c27024e22af4386b592b30d40e6a0820ceb48c1 (patch)
tree689d4b821fd6910a137a0f93351351def5011cec /module/zfs/dmu_tx.c
parentdf1f129bc4150fd6ea3f23a01154a71ffa48bf12 (diff)
Undo c89 workarounds to match with upstream
With PR 5756 the zfs module now supports c99 and the remaining past c89 workarounds can be undone. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes #6816
Diffstat (limited to 'module/zfs/dmu_tx.c')
-rw-r--r--module/zfs/dmu_tx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c
index 30cb3c1ff..2bb202647 100644
--- a/module/zfs/dmu_tx.c
+++ b/module/zfs/dmu_tx.c
@@ -392,7 +392,6 @@ dmu_tx_hold_free_impl(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
SPA_BLKPTRSHIFT;
uint64_t start = off >> shift;
uint64_t end = (off + len) >> shift;
- uint64_t i;
ASSERT(dn->dn_indblkshift != 0);
@@ -406,7 +405,7 @@ dmu_tx_hold_free_impl(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
zio_t *zio = zio_root(tx->tx_pool->dp_spa,
NULL, NULL, ZIO_FLAG_CANFAIL);
- for (i = start; i <= end; i++) {
+ for (uint64_t i = start; i <= end; i++) {
uint64_t ibyte = i << shift;
err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0);
i = ibyte >> shift;
@@ -1114,15 +1113,13 @@ dmu_tx_destroy(dmu_tx_t *tx)
void
dmu_tx_commit(dmu_tx_t *tx)
{
- dmu_tx_hold_t *txh;
-
ASSERT(tx->tx_txg != 0);
/*
* Go through the transaction's hold list and remove holds on
* associated dnodes, notifying waiters if no holds remain.
*/
- for (txh = list_head(&tx->tx_holds); txh != NULL;
+ for (dmu_tx_hold_t *txh = list_head(&tx->tx_holds); txh != NULL;
txh = list_next(&tx->tx_holds, txh)) {
dnode_t *dn = txh->txh_dnode;