From: Ralph Boehme Date: Mon, 7 Jan 2019 20:10:19 +0000 (+0100) Subject: s3:smbd: don't use async dosmode if per-thread cwd is not available X-Git-Tag: talloc-2.1.15~149 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=57e2fb018f2040d1e2d487a4590f103022496b44 s3:smbd: don't use async dosmode if per-thread cwd is not available The additional overhead for the async processing should be avoided when we know the lower level has to fallback to sync processing anyway. Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 6020025b28b..fdb87188f93 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -516,6 +516,9 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx, size_t max_threads; max_threads = pthreadpool_tevent_max_threads(conn->sconn->pool); + if (max_threads == 0 || !per_thread_cwd_supported()) { + state->async_dosmode = false; + } state->max_async_dosmode_active = lp_smbd_max_async_dosmode( SNUM(conn));