]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: Hold a config reference in vfs_ceph_fh
authorAnoop C S <anoopcs@samba.org>
Thu, 5 Sep 2024 08:31:37 +0000 (14:01 +0530)
committerJule Anger <janger@samba.org>
Mon, 17 Feb 2025 16:09:09 +0000 (16:09 +0000)
This is required to perform the cleanup when fsp extension destructor is
called as part of VFS_REMOVE_FSP_EXTENSION where mount information and
function references are to be used in upcoming changes.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15703

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 250af54250bed87928250b95db663ff13cc1f42a)

source3/modules/vfs_ceph_new.c

index 45b3c84b8aed3a3704bfefe236497deedd1149b8..266871687a101c5c6d0f27d35f49c1ebf88495b9 100644 (file)
@@ -620,6 +620,7 @@ struct vfs_ceph_fh {
        struct cephmount_cached *cme;
        struct UserPerm *uperm;
        struct files_struct *fsp;
+       struct vfs_ceph_config *config;
        struct vfs_ceph_iref iref;
        struct Fh *fh;
        int fd;
@@ -697,6 +698,7 @@ static int vfs_ceph_add_fh(struct vfs_handle_struct *handle,
        (*out_cfh)->cme = cme;
        (*out_cfh)->uperm = uperm;
        (*out_cfh)->fsp = fsp;
+       (*out_cfh)->config = config;
        (*out_cfh)->fd = -1;
        return 0;
 }