summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking_shm.c8
-rw-r--r--source3/locking/locking_slow.c6
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c
index 45ab14d452..77ceb2573c 100644
--- a/source3/locking/locking_shm.c
+++ b/source3/locking/locking_shm.c
@@ -619,14 +619,16 @@ static int shm_share_forall(void (*fn)(share_mode_entry *, char *))
while(entry_scanner_p != 0) {
- fn(&entry_scanner_p->e,
- file_scanner_p->file_name);
+ if (process_exists(entry_scanner_p->e.pid)) {
+ fn(&entry_scanner_p->e,
+ file_scanner_p->file_name);
+ count++;
+ }
entry_scanner_p =
(shm_share_mode_entry *)
shmops->offset2addr(
entry_scanner_p->next_share_mode_entry);
- count++;
} /* end while entry_scanner_p */
file_scanner_p = (share_mode_record *)
shmops->offset2addr(file_scanner_p->next_offset);
diff --git a/source3/locking/locking_slow.c b/source3/locking/locking_slow.c
index 9bd6d65aa7..935ed09f60 100644
--- a/source3/locking/locking_slow.c
+++ b/source3/locking/locking_slow.c
@@ -996,8 +996,10 @@ static int slow_share_forall(void (*fn)(share_mode_entry *, char *))
e.pid = SVAL(p,SME_PID_OFFSET);
e.op_type = SVAL(p,SME_OPLOCK_TYPE_OFFSET);
- fn(&e, fname);
- count++;
+ if (process_exists(e.pid)) {
+ fn(&e, fname);
+ count++;
+ }
} /* end for i */
if(buf)