[dovecot-cvs] dovecot/src/lib-index mail-index-view.c,1.38,1.39

cras at dovecot.org cras at dovecot.org
Fri Jan 6 20:38:03 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16425

Modified Files:
	mail-index-view.c 
Log Message:
We had been shared-locking index unnecessarily for quite a while when using
not-up-to-date views.



Index: mail-index-view.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- mail-index-view.c	6 Jan 2006 17:30:26 -0000	1.38
+++ mail-index-view.c	6 Jan 2006 18:38:01 -0000	1.39
@@ -86,6 +86,11 @@
 	if (mail_index_view_is_inconsistent(view))
 		return -1;
 
+	if (view->map != view->index->map) {
+		/* not head mapping, no need to lock */
+		return 0;
+	}
+
 	return mail_index_view_lock_head(view, FALSE);
 }
 



More information about the dovecot-cvs mailing list