Author: delphij
Date: Sat Dec 13 01:18:23 2014
New Revision: 275736
URL: https://svnweb.freebsd.org/changeset/base/275736

Log:
  MFV r275544:
  
  Clean up some duplicated code in dnode_sync() around freeing spill blocks.
  
  Illumos issue:
      5350 clean up code in dnode_sync()
  
  MFC after:    2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c    Sat Dec 
13 01:14:59 2014        (r275735)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c    Sat Dec 
13 01:18:23 2014        (r275736)
@@ -633,12 +633,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
            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;
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to