git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8b7036
)
NEEDED??? g_lock g_lock_trylock not self
author
Stefan Metzmacher
<metze@samba.org>
Thu, 21 Dec 2017 08:37:10 +0000
(09:37 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 29 Oct 2019 13:33:03 +0000
(14:33 +0100)
WAS
382e665fd7a571446ec36bbb20e7e1ebeeef39cd
source3/lib/g_lock.c
patch
|
blob
|
history
diff --git
a/source3/lib/g_lock.c
b/source3/lib/g_lock.c
index 5f4c084e05c22aa0e5856ab9ba31dc1b3c672949..4cd900c036297bf7b38a634a0e2947b547aaa2e7 100644
(file)
--- a/
source3/lib/g_lock.c
+++ b/
source3/lib/g_lock.c
@@
-272,6
+272,11
@@
static NTSTATUS g_lock_trylock(struct db_record *rec, struct server_id self,
g_lock_get_rec(&lck, i, &check_rec);
+ if (serverid_equal(&self, &check_rec.pid)) {
+ i = (i + 1) % lck.num_recs;
+ g_lock_get_rec(&lck, i, &check_rec);
+ }
+
if ((check_rec.lock_type == G_LOCK_READ) &&
!serverid_exists(&check_rec.pid)) {
g_lock_rec_del(&lck, i);