diff options
author | Stefan Metzmacher <metze@samba.org> | 2018-07-26 09:41:22 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2018-07-27 13:07:14 +0200 |
commit | ff863f2d98ac5e12073af824b794404c3d7198c5 (patch) | |
tree | 107545e74bffa2462ff476fcff6838fffb5fca7d /lib/pthreadpool | |
parent | 591d72f9c7981350eba19221398dbe7bcf0c098b (diff) | |
download | samba-ff863f2d98ac5e12073af824b794404c3d7198c5.tar.gz |
pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on the callers pool
In pthreadpool_tevent_job_send() we remember if the job will be chdir
safe. It means we means we need to ask the callers pool when calling
pthreadpool_tevent_per_thread_cwd(), as the callers pool might
be a wrapper using pthreadpool_tevent_force_per_thread_cwd().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'lib/pthreadpool')
-rw-r--r-- | lib/pthreadpool/pthreadpool_tevent.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pthreadpool/pthreadpool_tevent.c b/lib/pthreadpool/pthreadpool_tevent.c index f88f82d17d8..b4a9786f231 100644 --- a/lib/pthreadpool/pthreadpool_tevent.c +++ b/lib/pthreadpool/pthreadpool_tevent.c @@ -992,6 +992,7 @@ 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(); @@ -1037,7 +1038,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(pool); + job->per_thread_cwd = pthreadpool_tevent_per_thread_cwd(caller_pool); talloc_set_destructor(job, pthreadpool_tevent_job_destructor); DLIST_ADD_END(job->pool->jobs, job); job->state = state; |