Revert "smbd: explain that/why we use the raw tevent_context for oplock_timeout_handl...
authorRalph Boehme <slow@samba.org>
Thu, 27 Dec 2018 14:23:52 +0000 (15:23 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Jan 2019 22:11:17 +0000 (23:11 +0100)
This reverts commit e73eaa3c8004d3d8aff316cdb26b0bef85eceaca.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/oplock.c

index 3feddaa..64ca0d1 100644 (file)
@@ -817,11 +817,6 @@ static void oplock_timeout_handler(struct tevent_context *ctx,
 {
        files_struct *fsp = (files_struct *)private_data;
 
-       /*
-        * Note this function doesn't run under any specific impersonation and
-        * is not expected to call any SMB_VFS operation!
-        */
-
        SMB_ASSERT(fsp->sent_oplock_break != NO_BREAK_SENT);
 
        /* Remove the timed event handler. */
@@ -842,15 +837,8 @@ static void add_oplock_timeout_handler(files_struct *fsp)
                          "around\n"));
        }
 
-       /*
-        * For now we keep the logic and use the
-        * raw event context. We're called from
-        * the messaging system from a raw event context.
-        * Also oplock_timeout_handler doesn't invoke
-        * SMB_VFS calls.
-        */
        fsp->oplock_timeout =
-               tevent_add_timer(fsp->conn->sconn->raw_ev_ctx, fsp,
+               tevent_add_timer(fsp->conn->sconn->ev_ctx, fsp,
                                 timeval_current_ofs(OPLOCK_BREAK_TIMEOUT, 0),
                                 oplock_timeout_handler, fsp);