diff options
author | Matthew Ahrens <[email protected]> | 2015-05-07 03:24:09 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-05-11 15:09:51 -0700 |
commit | 08dc1b2ddd3526bf6c495403b62d2e5a7ddc1b3b (patch) | |
tree | 9df0783ee1d31cc76c96769f126a1f78e7dbd5ce /module | |
parent | 7224c67fea3c427ab0d5bafb6d7fba32a7a592d9 (diff) |
Illumos 5350 - clean up code in dnode_sync()
Author: Matthew Ahrens <[email protected]>
Reviewed by: Alex Reece <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Richard Elling <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
https://www.illumos.org/issues/5350
https://github.com/illumos/illumos-gate/commit/e651831
Ported-by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3382
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dnode_sync.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c index 5c80a531d..6f668364b 100644 --- a/module/zfs/dnode_sync.c +++ b/module/zfs/dnode_sync.c @@ -638,12 +638,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) freeing_dnode = dn->dn_free_txg > 0 && dn->dn_free_txg <= tx->tx_txg; /* - * We will either remove a spill block when a file is being removed - * or we have been asked to remove it. + * Remove the spill block if we have been explicitly asked to + * remove it, or if the object is being removed. */ - if (dn->dn_rm_spillblk[txgoff] || - ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) && freeing_dnode)) { - if ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) + if (dn->dn_rm_spillblk[txgoff] || freeing_dnode) { + if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) kill_spill = B_TRUE; dn->dn_rm_spillblk[txgoff] = 0; } |