]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: syncops: Add 'connection_struct *conn' to syncops_sync_directory().
authorJeremy Allison <jra@samba.org>
Thu, 17 Jun 2021 19:01:48 +0000 (12:01 -0700)
committerNoel Power <npower@samba.org>
Tue, 22 Jun 2021 13:44:34 +0000 (13:44 +0000)
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 <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/modules/vfs_syncops.c

index 99ed13f7b595210058bba273cfd1e6dfa4d27cb4..c3f11cf67e9952413399dec036e41e7751da8ecb 100644 (file)
@@ -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);
                }
        }