From 689a04bc6c21d35cf2b3e025cb9ff3aab3fcfc23 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 7 May 2012 12:22:50 +0200 Subject: [PATCH] s3: Check for serverid_exists in notify_deferred_opens We will remove the check in parse_share_modes soon Signed-off-by: Jeremy Allison --- source3/smbd/close.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index c87b1a000be..1bac2a1cdfc 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -179,9 +179,15 @@ static void notify_deferred_opens(struct smbd_server_connection *sconn, num_deferred = 0; for (i=0; idata->num_share_modes; i++) { - if (is_deferred_open_entry(&lck->data->share_modes[i])) { - num_deferred += 1; + struct share_mode_entry *e = &lck->data->share_modes[i]; + + if (!is_deferred_open_entry(e)) { + continue; } + if (share_mode_stale_pid(lck->data, i)) { + continue; + } + num_deferred += 1; } if (num_deferred == 0) { return;