From: Jeremy Allison Date: Wed, 23 Jun 2021 18:14:52 +0000 (-0700) Subject: s3: VFS: ceph_snapshots: In ceph_snap_fill_label() - pass in dirfsp instead of the... X-Git-Tag: tevent-0.11.0~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abe3a396e0e32f72a4fc0f9b2b10a968c8542fea;p=thirdparty%2Fsamba.git s3: VFS: ceph_snapshots: In ceph_snap_fill_label() - pass in dirfsp instead of the raw path. We will use this for openat_pathref_fsp() later. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index 1b5322475dd..0ed79920064 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -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);