]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mdbox: When mail's refcount is too high, don't prevent shrinking the refcount.
authorTimo Sirainen <tss@iki.fi>
Sat, 2 Nov 2013 10:25:09 +0000 (12:25 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 2 Nov 2013 10:25:09 +0000 (12:25 +0200)
src/lib-storage/index/dbox-multi/mdbox-map.c

index 071e084db66f02451903232e07d36af42e9edf26..7e86eac6cb769419cd246f71b5f12f690697317a 100644 (file)
@@ -649,7 +649,7 @@ int mdbox_map_update_refcount(struct mdbox_map_transaction_context *ctx,
                                        map_uid);
                return -1;
        }
-       if (old_diff + new_diff >= 32768) {
+       if (old_diff + new_diff >= 32768 && new_diff > 0) {
                /* we're getting close to the 64k limit. fail early
                   to make it less likely that two processes increase
                   the refcount enough times to cross the limit */