[Pkg-samba-maint] [samba] 114/135: s3:smb2_server: use tevent_req_notify_callback() in smbd_smb2_request_pending_queue()
Ivo De Decker
ivodd at moszumanska.debian.org
Sat Jan 11 21:30:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
ivodd pushed a commit to branch master
in repository samba.
commit 79c54dc79842542b2c9f371d485e4642e639fb25
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Oct 12 02:40:12 2013 +0200
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 at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
(cherry picked from commit acfd4b068a5b99ac1d3fe716afff34cb7d2a0147)
---
source3/smbd/smb2_server.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index f2703af..b179a0b 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list