summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-22 19:16:56 -0700
committerStefan Metzmacher <metze@samba.org>2013-10-06 13:54:14 +0200
commit4cde5bf1a406e14fcc7a51eba1e337fd1d3c80b3 (patch)
tree9064c31f2efd229ee9d070037217124b207cf52f
parent9110c079f1aa504bc114d8c00a5a48f58dce5459 (diff)
downloadsamba-4cde5bf1a406e14fcc7a51eba1e337fd1d3c80b3.tar.gz
samba-4cde5bf1a406e14fcc7a51eba1e337fd1d3c80b3.tar.bz2
samba-4cde5bf1a406e14fcc7a51eba1e337fd1d3c80b3.zip
smbd: Avoid calling serverid_exists twice
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/locking/locking.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index d4c68f8841..d0b6eaf995 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -646,6 +646,12 @@ bool share_mode_stale_pid(struct share_mode_data *d, unsigned idx)
return false;
}
e = &d->share_modes[idx];
+ if (e->stale) {
+ /*
+ * Checked before
+ */
+ return true;
+ }
if (serverid_exists(&e->pid)) {
DEBUG(10, ("PID %s (index %u out of %u) still exists\n",
procid_str_static(&e->pid), idx,