]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: ceph_snapshots: In ceph_snap_fill_label() - pass in dirfsp instead of the...
authorJeremy Allison <jra@samba.org>
Wed, 23 Jun 2021 18:14:52 +0000 (11:14 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 25 Jun 2021 15:53:31 +0000 (15:53 +0000)
We will use this for openat_pathref_fsp() later.

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

index 1b5322475dd3ff5c0943fafa5d227da7e436e096..0ed79920064ad6217de9bb1b0d55bd6fe654db3e 100644 (file)
@@ -192,10 +192,11 @@ static int ceph_snap_get_btime_fsp(struct vfs_handle_struct *handle,
  */
 static int ceph_snap_fill_label(struct vfs_handle_struct *handle,
                                TALLOC_CTX *tmp_ctx,
-                               const char *parent_snapsdir,
+                               struct files_struct *dirfsp,
                                const char *subdir,
                                SHADOW_COPY_LABEL this_label)
 {
+       const char *parent_snapsdir = dirfsp->fsp_name->base_name;
        struct smb_filename *smb_fname;
        time_t snap_secs;
        struct tm gmt_snap_time;
@@ -328,8 +329,10 @@ static int ceph_snap_enum_snapdir(struct vfs_handle_struct *handle,
                }
                DBG_DEBUG("filling shadow copy label for %s/%s\n",
                          snaps_dname->base_name, dname);
-               ret = ceph_snap_fill_label(handle, snaps_dname,
-                               snaps_dname->base_name, dname,
+               ret = ceph_snap_fill_label(handle,
+                               snaps_dname,
+                               dirfsp,
+                               dname,
                                sc_data->labels[sc_data->num_volumes - 1]);
                if (ret < 0) {
                        TALLOC_FREE(talloced);