diff options
author | delphij <delphij@FreeBSD.org> | 2013-06-11 19:02:36 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2013-06-11 19:02:36 +0000 |
commit | 9d0815fcd162db9197ce3750a1e17c721ecbd315 (patch) | |
tree | 85382c064b2f1478b74ec96e01bb7b504ad9549b /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c | |
parent | 0ae9c65c0f385ead30d33793507556ef4639f6e5 (diff) | |
download | FreeBSD-src-9d0815fcd162db9197ce3750a1e17c721ecbd315.zip FreeBSD-src-9d0815fcd162db9197ce3750a1e17c721ecbd315.tar.gz |
MFV r251619:
ZFS needs better comments.
Illumos ZFS issues:
3741 zfs needs better comments
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c index 3eeaca6..5338425 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c @@ -1014,6 +1014,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; @@ -1126,6 +1130,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; |