diff options
author | Will Andrews <[email protected]> | 2013-06-11 09:12:34 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-04 10:55:25 -0800 |
commit | e49f1e20a09181d03382d64afdc4b7a12a5dfdf1 (patch) | |
tree | 301457b83154f25be39a6135f797ca5cb83daf1e /module/zfs/dmu_tx.c | |
parent | b1118acbb16ec347f6a3eb091d9b7097d12b8d54 (diff) |
Illumos #3741
3741 zfs needs better comments
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Eric Schrock <[email protected]>
Approved by: Christopher Siden <[email protected]>
References:
https://www.illumos.org/issues/3741
illumos/illumos-gate@3e30c24aeefdee1631958ecf17f18da671781956
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
Diffstat (limited to 'module/zfs/dmu_tx.c')
-rw-r--r-- | module/zfs/dmu_tx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index 1cad8d20e..caac60193 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -1040,6 +1040,10 @@ dmu_tx_unassign(dmu_tx_t *tx) txg_rele_to_quiesce(&tx->tx_txgh); + /* + * Walk the transaction's hold list, removing the hold on the + * associated dnode, and notifying waiters if the refcount drops to 0. + */ for (txh = list_head(&tx->tx_holds); txh != tx->tx_needassign_txh; txh = list_next(&tx->tx_holds, txh)) { dnode_t *dn = txh->txh_dnode; @@ -1157,6 +1161,10 @@ dmu_tx_commit(dmu_tx_t *tx) ASSERT(tx->tx_txg != 0); + /* + * Go through the transaction's hold list and remove holds on + * associated dnodes, notifying waiters if no holds remain. + */ while ((txh = list_head(&tx->tx_holds))) { dnode_t *dn = txh->txh_dnode; |