Print this page
6334 Cannot unlink files when over quota

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zfs_vnops.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_vnops.c
↓ open down ↓ 1726 lines elided ↑ open up ↑
1727 1727  
1728 1728          mutex_enter(&zp->z_lock);
1729 1729          if ((acl_obj = zfs_external_acl(zp)) != 0 && may_delete_now)
1730 1730                  dmu_tx_hold_free(tx, acl_obj, 0, DMU_OBJECT_END);
1731 1731          mutex_exit(&zp->z_lock);
1732 1732  
1733 1733          /* charge as an update -- would be nice not to charge at all */
1734 1734          dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
1735 1735  
1736 1736          /*
1737      -         * Mark this transaction as typically resulting in a net free of
1738      -         * space, unless object removal will be delayed indefinitely
1739      -         * (due to active holds on the vnode due to the file being open).
     1737 +         * Mark this transaction as typically resulting in a net free of space
1740 1738           */
1741      -        if (may_delete_now)
1742      -                dmu_tx_mark_netfree(tx);
     1739 +        dmu_tx_mark_netfree(tx);
1743 1740  
1744 1741          error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
1745 1742          if (error) {
1746 1743                  zfs_dirent_unlock(dl);
1747 1744                  VN_RELE(vp);
1748 1745                  if (xzp)
1749 1746                          VN_RELE(ZTOV(xzp));
1750 1747                  if (error == ERESTART) {
1751 1748                          waited = B_TRUE;
1752 1749                          dmu_tx_wait(tx);
↓ open down ↓ 3608 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX