From: Jeremy Allison Date: Thu, 17 Jun 2021 19:01:48 +0000 (-0700) Subject: s3: VFS: syncops: Add 'connection_struct *conn' to syncops_sync_directory(). X-Git-Tag: tevent-0.11.0~236 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d1972b79ea30944859e7bef57bf5b53516967d2;p=thirdparty%2Fsamba.git s3: VFS: syncops: Add 'connection_struct *conn' to syncops_sync_directory(). Remove 'const' from 'char *dname' parameter. This is always a talloc allocated pointer. Not yet used. This will allow us to make syncops really stackable later. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c index 99ed13f7b59..c3f11cf67e9 100644 --- a/source3/modules/vfs_syncops.c +++ b/source3/modules/vfs_syncops.c @@ -71,7 +71,8 @@ static char *parent_dir(TALLOC_CTX *mem_ctx, const char *name) /* fsync a directory by name */ -static void syncops_sync_directory(const char *dname) +static void syncops_sync_directory(connection_struct *conn, + char *dname) { #ifdef O_DIRECTORY int fd = open(dname, O_DIRECTORY|O_RDONLY); @@ -103,9 +104,9 @@ static void syncops_two_names(connection_struct *conn, talloc_free(tmp_ctx); return; } - syncops_sync_directory(parent1); + syncops_sync_directory(conn, parent1); if (strcmp(parent1, parent2) != 0) { - syncops_sync_directory(parent2); + syncops_sync_directory(conn, parent2); } talloc_free(tmp_ctx); } @@ -120,7 +121,7 @@ static void syncops_smb_fname(connection_struct *conn, if (smb_fname != NULL) { parent = parent_dir(NULL, smb_fname->base_name); if (parent != NULL) { - syncops_sync_directory(parent); + syncops_sync_directory(conn, parent); talloc_free(parent); } }