diff --git a/src/plugins/quota/quota.c b/src/plugins/quota/quota.c index 830a79b78f..40422e0b49 100644 --- a/src/plugins/quota/quota.c +++ b/src/plugins/quota/quota.c @@ -1275,7 +1275,7 @@ enum quota_alloc_result quota_try_alloc(struct quota_transaction_context *ctx, /* with quota_try_alloc() we want to keep track of how many bytes we've been adding/removing, so disable auto_updating=TRUE optimization. this of course doesn't work perfectly if - quota_alloc() or quota_free*() was already used within the same + quota_alloc() or quota_free_bytes() was already used within the same transaction, but that doesn't normally happen. */ ctx->auto_updating = FALSE; quota_alloc(ctx, mail); @@ -1349,18 +1349,6 @@ void quota_alloc(struct quota_transaction_context *ctx, struct mail *mail) ctx->count_used++; } -void quota_free(struct quota_transaction_context *ctx, struct mail *mail) -{ - uoff_t size; - - if (ctx->auto_updating) - return; - if (quota_get_mail_size(ctx, mail, &size) < 0) - quota_recalculate(ctx, QUOTA_RECALCULATE_MISSING_FREES); - else - quota_free_bytes(ctx, size); -} - void quota_free_bytes(struct quota_transaction_context *ctx, uoff_t physical_size) { diff --git a/src/plugins/quota/quota.h b/src/plugins/quota/quota.h index 8663d2b2cb..131bd4b396 100644 --- a/src/plugins/quota/quota.h +++ b/src/plugins/quota/quota.h @@ -108,7 +108,6 @@ enum quota_alloc_result quota_test_alloc(struct quota_transaction_context *ctx, uoff_t size); /* Update quota by allocating/freeing space used by mail. */ void quota_alloc(struct quota_transaction_context *ctx, struct mail *mail); -void quota_free(struct quota_transaction_context *ctx, struct mail *mail); void quota_free_bytes(struct quota_transaction_context *ctx, uoff_t physical_size); /* Mark the quota to be recalculated */