1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

s3:smb2_server: use tevent_req_notify_callback() in smbd_smb2_request_pending_queue()

If the request is already done we can avoid one iteration
of tevent_loop_once(), which means we avoids one
talloc_stackframe_pool/talloc_free pair.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
Stefan Metzmacher 2013-10-12 02:40:12 +02:00
parent 4244a2686c
commit acfd4b068a

View File

@ -1252,6 +1252,13 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
uint32_t flags;
if (!tevent_req_is_in_progress(subreq)) {
/*
* This is a performance optimization,
* it avoids one tevent_loop iteration,
* which means we avoid one
* talloc_stackframe_pool/talloc_free pair.
*/
tevent_req_notify_callback(subreq);
return NT_STATUS_OK;
}