summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/close.c16
-rw-r--r--source3/smbd/open.c25
-rw-r--r--source3/smbd/trans2.c3
3 files changed, 2 insertions, 42 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index e46e1aec89..c87b1a000b 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -179,15 +179,9 @@ static void notify_deferred_opens(struct smbd_server_connection *sconn,
num_deferred = 0;
for (i=0; i<lck->data->num_share_modes; i++) {
- 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;
+ if (is_deferred_open_entry(&lck->data->share_modes[i])) {
+ num_deferred += 1;
}
- num_deferred += 1;
}
if (num_deferred == 0) {
return;
@@ -425,9 +419,6 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
if (fsp->posix_open && (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) {
continue;
}
- if (share_mode_stale_pid(lck->data, i)) {
- continue;
- }
delete_file = False;
break;
}
@@ -1078,9 +1069,6 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
if (fsp->posix_open && (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) {
continue;
}
- if (share_mode_stale_pid(lck->data, i)) {
- continue;
- }
delete_dir = False;
break;
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index f0e523dc77..543a6619e9 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1024,11 +1024,6 @@ static NTSTATUS open_mode_check(connection_struct *conn,
* too */
if (share_conflict(&lck->data->share_modes[i],
access_mask, share_access)) {
-
- if (share_mode_stale_pid(lck->data, i)) {
- continue;
- }
-
return NT_STATUS_SHARING_VIOLATION;
}
}
@@ -1128,11 +1123,6 @@ static void find_oplock_types(files_struct *fsp,
if (BATCH_OPLOCK_TYPE(lck->data->share_modes[i].op_type)) {
/* batch - can only be one. */
- if (share_mode_stale_pid(lck->data, i)) {
- DEBUG(10, ("find_oplock_types: Found stale "
- "batch oplock\n"));
- continue;
- }
if (*pp_ex_or_batch || *pp_batch || *got_level2 || *got_no_oplock) {
smb_panic("Bad batch oplock entry.");
}
@@ -1140,11 +1130,6 @@ static void find_oplock_types(files_struct *fsp,
}
if (EXCLUSIVE_OPLOCK_TYPE(lck->data->share_modes[i].op_type)) {
- if (share_mode_stale_pid(lck->data, i)) {
- DEBUG(10, ("find_oplock_types: Found stale "
- "duplicate oplock\n"));
- continue;
- }
/* Exclusive or batch - can only be one. */
if (*pp_ex_or_batch || *got_level2 || *got_no_oplock) {
smb_panic("Bad exclusive or batch oplock entry.");
@@ -1154,11 +1139,6 @@ static void find_oplock_types(files_struct *fsp,
if (LEVEL_II_OPLOCK_TYPE(lck->data->share_modes[i].op_type)) {
if (*pp_batch || *pp_ex_or_batch) {
- if (share_mode_stale_pid(lck->data, i)) {
- DEBUG(10, ("find_oplock_types: Found "
- "stale LevelII oplock\n"));
- continue;
- }
smb_panic("Bad levelII oplock entry.");
}
*got_level2 = true;
@@ -1166,11 +1146,6 @@ static void find_oplock_types(files_struct *fsp,
if (lck->data->share_modes[i].op_type == NO_OPLOCK) {
if (*pp_batch || *pp_ex_or_batch) {
- if (share_mode_stale_pid(lck->data, i)) {
- DEBUG(10, ("find_oplock_types: Found "
- "stale NO_OPLOCK entry\n"));
- continue;
- }
smb_panic("Bad no oplock entry.");
}
*got_no_oplock = true;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 936b39a2c2..590ee5bf7c 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -7595,9 +7595,6 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
if (e->flags & SHARE_MODE_FLAG_POSIX_OPEN) {
continue;
}
- if (share_mode_stale_pid(lck->data, i)) {
- continue;
- }
/* Fail with sharing violation. */
close_file(req, fsp, NORMAL_CLOSE);
TALLOC_FREE(lck);