smbd: Fix debugs in file_new() and fsp_new().
authorJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 07:55:31 +0000 (23:55 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 18:56:28 +0000 (18:56 +0000)
Allows grep ' files structure ' in the log
to count up and down the number of files allocated.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/files.c

index e12f527f3d74f724951b4e6379a77b8e1a6eae0b..00bf7445a731edb00c7ed510cac56a5a8e8c3604 100644 (file)
@@ -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