Skip to content

Commit 08dc1b2

Browse files
ahrensbehlendorf
authored andcommitted
Illumos 5350 - clean up code in dnode_sync()
Author: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Alex Reece <alex.reece@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Richard Elling <richard.elling@richardelling.com> Approved by: Dan McDonald <danmcd@omniti.com> References: https://www.illumos.org/issues/5350 illumos/illumos-gate@e651831 Ported-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3382
1 parent 7224c67 commit 08dc1b2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

module/zfs/dnode_sync.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
638638
freeing_dnode = dn->dn_free_txg > 0 && dn->dn_free_txg <= tx->tx_txg;
639639

640640
/*
641-
* We will either remove a spill block when a file is being removed
642-
* or we have been asked to remove it.
641+
* Remove the spill block if we have been explicitly asked to
642+
* remove it, or if the object is being removed.
643643
*/
644-
if (dn->dn_rm_spillblk[txgoff] ||
645-
((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) && freeing_dnode)) {
646-
if ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR))
644+
if (dn->dn_rm_spillblk[txgoff] || freeing_dnode) {
645+
if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR)
647646
kill_spill = B_TRUE;
648647
dn->dn_rm_spillblk[txgoff] = 0;
649648
}

0 commit comments

Comments
 (0)