git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2843cf
)
tdb: Only mmap the mutex area if not already mmap'ed
author
Volker Lendecke
<vl@samba.org>
Mon, 21 Nov 2016 19:58:08 +0000
(20:58 +0100)
committer
Jeremy Allison
<jra@samba.org>
Tue, 29 Nov 2016 19:03:25 +0000
(20:03 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tdb/common/mutex.c
patch
|
blob
|
history
diff --git
a/lib/tdb/common/mutex.c
b/lib/tdb/common/mutex.c
index 3420d21f348a3eaf8b2ff370f8da3480361b0bcd..3df9f5b06adf6334d46a0d71f070a6649d364431 100644
(file)
--- a/
lib/tdb/common/mutex.c
+++ b/
lib/tdb/common/mutex.c
@@
-623,6
+623,10
@@
int tdb_mutex_mmap(struct tdb_context *tdb)
return 0;
}
+ if (tdb->mutexes != NULL) {
+ return 0;
+ }
+
ptr = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FILE,
tdb->fd, 0);
if (ptr == MAP_FAILED) {