summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-26 15:05:50 +0200
committerJeremy Allison <jra@samba.org>2013-04-26 15:17:22 -0700
commita7e803485d0255fa7fa92970ee535e1e2c9a29a1 (patch)
treeb7af058f744b040fee3d91bb6e3582e44b9ea8de /source3/locking
parent8da5a0f1e33a85281610700b58b534bc985894f0 (diff)
downloadsamba-a7e803485d0255fa7fa92970ee535e1e2c9a29a1.tar.gz
samba-a7e803485d0255fa7fa92970ee535e1e2c9a29a1.tar.bz2
samba-a7e803485d0255fa7fa92970ee535e1e2c9a29a1.zip
smbd: We don't use DEFERRED_OPEN_ENTRY anymore
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c61
-rw-r--r--source3/locking/proto.h6
2 files changed, 0 insertions, 67 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index a7fc50c5a9..7e65616d40 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -627,11 +627,6 @@ bool is_valid_share_mode_entry(const struct share_mode_entry *e)
return (num_props != 0);
}
-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
@@ -699,23 +694,6 @@ static void fill_share_mode_entry(struct share_mode_entry *e,
e->name_hash = fsp->name_hash;
}
-static void fill_deferred_open_entry(struct share_mode_entry *e,
- const struct timeval request_time,
- struct file_id id,
- struct server_id pid,
- uint64_t mid)
-{
- ZERO_STRUCTP(e);
- e->pid = pid;
- e->op_mid = mid;
- e->op_type = DEFERRED_OPEN_ENTRY;
- e->time.tv_sec = request_time.tv_sec;
- e->time.tv_usec = request_time.tv_usec;
- e->id = id;
- e->uid = (uint32)-1;
- e->flags = 0;
-}
-
static void add_share_mode_entry(struct share_mode_data *d,
const struct share_mode_entry *entry)
{
@@ -732,15 +710,6 @@ void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
add_share_mode_entry(lck->data, &entry);
}
-void add_deferred_open(struct share_mode_lock *lck, uint64_t mid,
- struct timeval request_time,
- struct server_id pid, struct file_id id)
-{
- struct share_mode_entry entry;
- fill_deferred_open_entry(&entry, request_time, id, pid, mid);
- add_share_mode_entry(lck->data, &entry);
-}
-
/*******************************************************************
Check if two share mode entries are identical, ignoring oplock
and mid info and desired_access. (Removed paranoia test - it's
@@ -760,14 +729,6 @@ static bool share_modes_identical(struct share_mode_entry *e1,
e1->share_file_id == e2->share_file_id );
}
-static bool deferred_open_identical(struct share_mode_entry *e1,
- struct share_mode_entry *e2)
-{
- return (serverid_equal(&e1->pid, &e2->pid) &&
- (e1->op_mid == e2->op_mid) &&
- file_id_equal(&e1->id, &e2->id));
-}
-
static struct share_mode_entry *find_share_mode_entry(struct share_mode_data *d,
struct share_mode_entry *entry)
{
@@ -780,11 +741,6 @@ static struct share_mode_entry *find_share_mode_entry(struct share_mode_data *d,
share_modes_identical(e, entry)) {
return e;
}
- if (is_deferred_open_entry(entry) &&
- is_deferred_open_entry(e) &&
- deferred_open_identical(e, entry)) {
- return e;
- }
}
return NULL;
}
@@ -849,23 +805,6 @@ bool mark_share_mode_disconnected(struct share_mode_lock *lck,
return true;
}
-void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid,
- struct server_id pid)
-{
- struct share_mode_entry entry, *e;
-
- fill_deferred_open_entry(&entry, timeval_zero(),
- lck->data->id, pid, mid);
-
- e = find_share_mode_entry(lck->data, &entry);
- if (e == NULL) {
- return;
- }
- *e = lck->data->share_modes[lck->data->num_share_modes-1];
- lck->data->num_share_modes -= 1;
- lck->data->modified = True;
-}
-
/*******************************************************************
Remove an oplock mid and mode entry from a share mode.
********************************************************************/
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index bb7255dcdc..adb30b7a55 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -170,18 +170,12 @@ void get_file_infos(struct file_id id,
bool *delete_on_close,
struct timespec *write_time);
bool is_valid_share_mode_entry(const struct share_mode_entry *e);
-bool is_deferred_open_entry(const struct share_mode_entry *e);
bool share_mode_stale_pid(struct share_mode_data *d, unsigned i);
void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
uid_t uid, uint64_t mid, uint16 op_type);
-void add_deferred_open(struct share_mode_lock *lck, uint64_t mid,
- struct timeval request_time,
- struct server_id pid, struct file_id id);
bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
bool mark_share_mode_disconnected(struct share_mode_lock *lck,
struct files_struct *fsp);
-void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid,
- struct server_id pid);
bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
bool get_delete_on_close_token(struct share_mode_lock *lck,