From: Timo Sirainen Date: Sun, 20 Jun 2004 13:14:17 +0000 (+0300) Subject: Exclusive index locking always used copy-locking without even trying X-Git-Tag: 1.1.alpha1~3894 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d5101a9e42a98724b4ca2860c16f1ada7dff17e;p=thirdparty%2Fdovecot%2Fcore.git Exclusive index locking always used copy-locking without even trying fcntl-locking. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-lock.c b/src/lib-index/mail-index-lock.c index 3593fd8665..4bc31a54ef 100644 --- a/src/lib-index/mail-index-lock.c +++ b/src/lib-index/mail-index-lock.c @@ -254,8 +254,8 @@ int mail_index_lock_exclusive(struct mail_index *index, /* if header size is smaller than what we have, we'll have to recreate the index to grow it. so don't even try regular locking. */ - if (index->map->hdr == &index->map->hdr_copy && - index->map->hdr->base_header_size < sizeof(*index->hdr)) { + if (index->map->hdr != &index->map->hdr_copy && + index->map->hdr->base_header_size == sizeof(*index->hdr)) { /* wait two seconds for exclusive lock */ ret = mail_index_lock(index, F_WRLCK, 2, TRUE, lock_id_r); if (ret > 0)