]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Illumos 5350 - clean up code in dnode_sync()
authorMatthew Ahrens <mahrens@delphix.com>
Wed, 6 May 2015 17:24:09 +0000 (03:24 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 11 May 2015 22:09:51 +0000 (15:09 -0700)
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
  https://github.com/illumos/illumos-gate/commit/e651831

Ported-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3382

module/zfs/dnode_sync.c

index 5c80a531d2d9fdeeed59e19712eb1fd2cfc9edaf..6f668364b704941475971544934bbb3a9e7b8c4c 100644 (file)
@@ -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;
        }