From: Simon Klinkert Date: Tue, 30 Aug 2016 13:03:05 +0000 (+0200) Subject: OpenZFS 6940 - Cannot unlink directories when over quota X-Git-Tag: zfs-0.7.0-rc1~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db707ad094431a8869123cb2389a4b768d5583a0;p=zfs OpenZFS 6940 - Cannot unlink directories when over quota From user perspective, I would expect that ZFS is always able to remove files and directories even when the quota is exceeded. Authored by: Simon Klinkert Reviewed by: Dan McDonald Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf OpenZFS-issue: https://www.illumos.org/issues/6940 OpenZFS-issue: https://www.illumos.org/issues/6334 OpenZFS-commit: https://github.com/illumos/illumos-gate/commit/9918916 Closes #5044 --- diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 707a21114..82016af75 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -2003,6 +2003,7 @@ top: dmu_tx_hold_zap(tx, zsb->z_unlinkedobj, FALSE, NULL); zfs_sa_upgrade_txholds(tx, zp); zfs_sa_upgrade_txholds(tx, dzp); + dmu_tx_mark_netfree(tx); error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT); if (error) { rw_exit(&zp->z_parent_lock);