summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 14:24:58 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 20:31:09 +0100
commitfcc1f5f7f7a5a1f51657c8da90f45142359a01bb (patch)
tree1321e41db2949115ee69650e73bcb65ceba131ea
parentdaa685c00847e28d3fd9e594af9afdfc5d962308 (diff)
downloadsamba-fcc1f5f7f7a5a1f51657c8da90f45142359a01bb.tar.gz
samba-fcc1f5f7f7a5a1f51657c8da90f45142359a01bb.tar.bz2
samba-fcc1f5f7f7a5a1f51657c8da90f45142359a01bb.zip
s3:smbd/oplock_onefs: pass smbd_server_connection to onefs_oplock_wait_record()
metze
-rw-r--r--source3/modules/onefs_open.c3
-rw-r--r--source3/smbd/oplock_onefs.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index d7b2af3544..a77d6f3e7e 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -871,7 +871,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
*/
if (req) {
SMB_ASSERT(fsp_data);
- oplock_callback_id = onefs_oplock_wait_record(req->mid);
+ oplock_callback_id = onefs_oplock_wait_record(req->sconn,
+ req->mid);
if (oplock_callback_id == 0) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/smbd/oplock_onefs.c b/source3/smbd/oplock_onefs.c
index d7e3608735..9e427a3607 100644
--- a/source3/smbd/oplock_onefs.c
+++ b/source3/smbd/oplock_onefs.c
@@ -47,6 +47,7 @@ enum onefs_callback_state {
struct onefs_callback_record {
struct onefs_callback_record *prev, *next;
+ struct smbd_server_connection *sconn;
uint64_t id;
enum onefs_callback_state state;
union {
@@ -198,7 +199,8 @@ void destroy_onefs_callback_record(uint64_t id)
* 2. OPEN_FILE: Once ifs_createfile completes, the callback record is
* transitioned to this state via onefs_set_oplock_callback.
*/
-uint64_t onefs_oplock_wait_record(uint64_t mid)
+uint64_t onefs_oplock_wait_record(struct smbd_server_connection *sconn,
+ uint64_t mid)
{
struct onefs_callback_record *result;
static uint64_t id_generator = 0;
@@ -216,6 +218,7 @@ uint64_t onefs_oplock_wait_record(uint64_t mid)
id_generator += 1;
}
+ result->sconn = sconn;
result->id = id_generator;
result->state = ONEFS_WAITING_FOR_OPLOCK;