From cbe1485f7b27a598588d42cf1430e74a90ef3e69 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Dec 2020 23:55:31 -0800 Subject: [PATCH] smbd: Fix debugs in file_new() and fsp_new(). Allows grep ' files structure ' in the log to count up and down the number of files allocated. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/files.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/smbd/files.c b/source3/smbd/files.c index e12f527f3d7..00bf7445a73 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -68,6 +68,9 @@ NTSTATUS fsp_new(struct connection_struct *conn, TALLOC_CTX *mem_ctx, conn->num_files_open++; + DBG_INFO("allocated files structure (%u used)\n", + (unsigned int)sconn->num_files); + *result = fsp; return NT_STATUS_OK; @@ -167,8 +170,7 @@ NTSTATUS file_new(struct smb_request *req, connection_struct *conn, return NT_STATUS_NO_MEMORY; } - DEBUG(5,("allocated file structure %s (%u used)\n", - fsp_fnum_dbg(fsp), (unsigned int)sconn->num_files)); + DBG_INFO("new file %s\n", fsp_fnum_dbg(fsp)); /* A new fsp invalidates the positive and negative fsp_fi_cache as the new fsp is pushed