From: Anoop C S Date: Thu, 5 Sep 2024 08:31:37 +0000 (+0530) Subject: vfs_ceph_new: Hold a config reference in vfs_ceph_fh X-Git-Tag: samba-4.20.8~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f85064175e5a2d2ee31a5ba7b642611fd65a7e0;p=thirdparty%2Fsamba.git vfs_ceph_new: Hold a config reference in vfs_ceph_fh 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 Reviewed-by: Guenther Deschner (cherry picked from commit 250af54250bed87928250b95db663ff13cc1f42a) --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 45b3c84b8ae..266871687a1 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -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; }