summaryrefslogtreecommitdiff
path: root/source3/locking/locking.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-05-18 09:10:02 +0200
committerVolker Lendecke <vl@samba.org>2012-05-18 13:12:14 +0200
commitf5ca3f11e47e48d195616f813b5b2c9e8255c6cd (patch)
tree85456771e595ecdb101a1b521a188baff231ed26 /source3/locking/locking.c
parent45082a88c7aaaa928ca36003ade071aafe4de54d (diff)
downloadsamba-f5ca3f11e47e48d195616f813b5b2c9e8255c6cd.tar.gz
samba-f5ca3f11e47e48d195616f813b5b2c9e8255c6cd.tar.bz2
samba-f5ca3f11e47e48d195616f813b5b2c9e8255c6cd.zip
s3: Revert the serverid changes, they need more work
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/locking/locking.c')
-rw-r--r--source3/locking/locking.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index b9fba17a87..b9afd2392c 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -556,10 +556,6 @@ bool rename_share_filename(struct messaging_context *msg_ctx,
continue;
}
- if (share_mode_stale_pid(d, i)) {
- continue;
- }
-
DEBUG(10,("rename_share_filename: sending rename message to "
"pid %s file_id %s sharepath %s base_name %s "
"stream_name %s\n",
@@ -620,9 +616,7 @@ bool is_valid_share_mode_entry(const struct share_mode_entry *e)
num_props += (EXCLUSIVE_OPLOCK_TYPE(e->op_type) ? 1 : 0);
num_props += (LEVEL_II_OPLOCK_TYPE(e->op_type) ? 1 : 0);
- if (serverid_exists(&e->pid) && (num_props > 1)) {
- smb_panic("Invalid share mode entry");
- }
+ SMB_ASSERT(num_props <= 1);
return (num_props != 0);
}
@@ -631,38 +625,6 @@ bool is_deferred_open_entry(const struct share_mode_entry *e)
return (e->op_type == DEFERRED_OPEN_ENTRY);
}
-/*
- * In case d->share_modes[i] conflicts with something or otherwise is
- * being used, we need to make sure the corresponding process still
- * exists. This routine checks it and potentially removes the entry
- * from d->share_modes. Modifies d->num_share_modes, watch out in
- * routines iterating over that array.
- */
-bool share_mode_stale_pid(struct share_mode_data *d, unsigned i)
-{
- struct share_mode_entry *e;
-
- if (i > d->num_share_modes) {
- DEBUG(1, ("Asking for index %u, only %u around\n",
- i, (unsigned)d->num_share_modes));
- return false;
- }
- e = &d->share_modes[i];
- if (serverid_exists(&e->pid)) {
- DEBUG(10, ("PID %s (index %u out of %u) still exists\n",
- procid_str_static(&e->pid), i,
- (unsigned)d->num_share_modes));
- return false;
- }
- DEBUG(10, ("PID %s (index %u out of %u) does not exist anymore\n",
- procid_str_static(&e->pid), i,
- (unsigned)d->num_share_modes));
- *e = d->share_modes[d->num_share_modes-1];
- d->num_share_modes -= 1;
- d->modified = true;
- return true;
-}
-
/*******************************************************************
Fill a share mode entry.
********************************************************************/