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

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 d733bec2d2662ff3429c672a4a991573074f1321..3feddaa90b871be3a608a175fad8392102550e3e 100644 (file)
@@ -1236,15 +1236,7 @@ static void contend_level2_oplocks_begin_default(files_struct *fsp,
                TALLOC_FREE(state);
                return;
        }
-
-       /*
-        * do_break_to_none() only operates on the
-        * locking.tdb and sends network packets to
-        * the client. That doesn't require any
-        * impersonation, so we just use the
-        * raw tevent context here.
-        */
-       tevent_schedule_immediate(im, sconn->raw_ev_ctx, do_break_to_none, state);
+       tevent_schedule_immediate(im, sconn->ev_ctx, do_break_to_none, state);
 }
 
 static void send_break_to_none(struct messaging_context *msg_ctx,
@@ -1271,11 +1263,6 @@ static void do_break_to_none(struct tevent_context *ctx,
        struct share_mode_lock *lck;
        struct share_mode_data *d;
 
-       /*
-        * Note this function doesn't run under any specific impersonation and
-        * is not expected to call any SMB_VFS operation!
-        */
-
        lck = get_existing_share_mode_lock(talloc_tos(), state->id);
        if (lck == NULL) {
                DEBUG(1, ("%s: failed to lock share mode entry for file %s.\n",