Print this page
6940 Cannot unlink directories 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 ↓ 2105 lines elided ↑ open up ↑
2106 2106           * with the treewalk and directory rename code.
2107 2107           */
2108 2108          rw_enter(&zp->z_parent_lock, RW_WRITER);
2109 2109  
2110 2110          tx = dmu_tx_create(zfsvfs->z_os);
2111 2111          dmu_tx_hold_zap(tx, dzp->z_id, FALSE, name);
2112 2112          dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
2113 2113          dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
2114 2114          zfs_sa_upgrade_txholds(tx, zp);
2115 2115          zfs_sa_upgrade_txholds(tx, dzp);
     2116 +        dmu_tx_mark_netfree(tx);
2116 2117          error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
2117 2118          if (error) {
2118 2119                  rw_exit(&zp->z_parent_lock);
2119 2120                  rw_exit(&zp->z_name_lock);
2120 2121                  zfs_dirent_unlock(dl);
2121 2122                  VN_RELE(vp);
2122 2123                  if (error == ERESTART) {
2123 2124                          waited = B_TRUE;
2124 2125                          dmu_tx_wait(tx);
2125 2126                          dmu_tx_abort(tx);
↓ open down ↓ 3244 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX