g_lock: Avoid a double call to serverid_exist
authorVolker Lendecke <vl@samba.org>
Mon, 13 Aug 2018 12:12:47 +0000 (14:12 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 14 Aug 2018 06:54:17 +0000 (08:54 +0200)
commit6b3cc7916b81e001b886b9c632babe345ca21d76
treefd2662abad7ce9655eeb262347e6f0e49425953d
parenta98f09a09db2fc7be85f9171b586e65344a39e92
g_lock: Avoid a double call to serverid_exist

If we try to G_LOCK_READ while a G_LOCK_WRITE is active, we do the
serverid_exists call twice. Avoid that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/g_lock.c