Revert "pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on the caller...
authorRalph Boehme <slow@samba.org>
Sun, 23 Dec 2018 08:23:48 +0000 (09:23 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Jan 2019 22:11:12 +0000 (23:11 +0100)
This reverts commit ff863f2d98ac5e12073af824b794404c3d7198c5.

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>
lib/pthreadpool/pthreadpool_tevent.c

index b4a9786..f88f82d 100644 (file)
@@ -992,7 +992,6 @@ struct tevent_req *pthreadpool_tevent_job_send(
        struct pthreadpool_tevent_job_state *state = NULL;
        struct pthreadpool_tevent_job *job = NULL;
        int ret;
-       struct pthreadpool_tevent *caller_pool = pool;
        struct pthreadpool_tevent_wrapper *wrapper = pool->wrapper.ctx;
 
        pthreadpool_tevent_cleanup_orphaned_jobs();
@@ -1038,7 +1037,7 @@ struct tevent_req *pthreadpool_tevent_job_send(
                return tevent_req_post(req, ev);
        }
        PTHREAD_TEVENT_JOB_THREAD_FENCE_INIT(job);
-       job->per_thread_cwd = pthreadpool_tevent_per_thread_cwd(caller_pool);
+       job->per_thread_cwd = pthreadpool_tevent_per_thread_cwd(pool);
        talloc_set_destructor(job, pthreadpool_tevent_job_destructor);
        DLIST_ADD_END(job->pool->jobs, job);
        job->state = state;