From af9f54ddc0b94953aa3f9406695e01b12f752b51 Mon Sep 17 00:00:00 2001 From: Simon Klinkert Date: Tue, 30 Aug 2016 15:03:05 +0200 Subject: [PATCH] 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 --- module/zfs/zfs_vnops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index e53992cbbd88..535e26887f8a 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -1999,6 +1999,7 @@ zfs_rmdir(struct inode *dip, char *name, struct inode *cwd, cred_t *cr, 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);