]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Remove unused quota_free()
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 4 Jun 2017 10:07:48 +0000 (13:07 +0300)
committerGitLab <gitlab@git.dovecot.net>
Fri, 9 Jun 2017 10:33:46 +0000 (13:33 +0300)
src/plugins/quota/quota.c
src/plugins/quota/quota.h

index 830a79b78f37caf0f3ebce3cf073b8c2899abdbc..40422e0b49865d75d6fa1fe758042c206c04e797 100644 (file)
@@ -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)
 {
index 8663d2b2cb517aa627dc13a3a2f4533bc53de118..131bd4b39689d1f2f1bedf5fbb902b765b41d617 100644 (file)
@@ -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 */