From 4cde5bf1a406e14fcc7a51eba1e337fd1d3c80b3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 22 Sep 2013 19:16:56 -0700 Subject: smbd: Avoid calling serverid_exists twice Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- source3/locking/locking.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/locking') 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, -- cgit