From 5173a3a4206d05f772a10a1b87eb5fd3c577c63a Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 16 Apr 2026 08:21:55 -0500 Subject: [PATCH] Change Branches::Ptr& to by-value to ensure lifetime in full call --- src/fuse_getxattr.cpp | 2 +- src/fuse_link.cpp | 4 ++-- src/fuse_readdir_cor.cpp | 2 +- src/fuse_readdir_cosr.cpp | 2 +- src/fuse_rename.cpp | 16 ++++++++-------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/fuse_getxattr.cpp b/src/fuse_getxattr.cpp index 6a84ab82..7b9236a7 100644 --- a/src/fuse_getxattr.cpp +++ b/src/fuse_getxattr.cpp @@ -97,7 +97,7 @@ _getxattr_from_string(char *destbuf_, static int -_getxattr_user_mergerfs_allpaths(const Branches::Ptr &branches_, +_getxattr_user_mergerfs_allpaths(const Branches::Ptr branches_, const fs::path &fusepath_, char *buf_, const size_t count_) diff --git a/src/fuse_link.cpp b/src/fuse_link.cpp index 594fa275..46ae6a2c 100644 --- a/src/fuse_link.cpp +++ b/src/fuse_link.cpp @@ -237,8 +237,8 @@ _link_exdev_rel_symlink(const fuse_req_ctx_t *ctx_, static int _link_exdev_abs_base_symlink(const fuse_req_ctx_t *ctx_, - const Policy::Search &openPolicy_, - const Branches::Ptr &ibranches_, + const Policy::Search &openPolicy_, + const Branches::Ptr ibranches_, const fs::path &oldpath_, const fs::path &newpath_, struct stat *st_, diff --git a/src/fuse_readdir_cor.cpp b/src/fuse_readdir_cor.cpp index b0f5ba4a..596a27f4 100644 --- a/src/fuse_readdir_cor.cpp +++ b/src/fuse_readdir_cor.cpp @@ -47,7 +47,7 @@ static inline int _concurrent_readdir(ThreadPool &tp_, - const Branches::Ptr &branches_, + const Branches::Ptr branches_, const fs::path &rel_dirpath_, fuse_dirents_t *dirents_) { diff --git a/src/fuse_readdir_cosr.cpp b/src/fuse_readdir_cosr.cpp index a916ba2e..6d7bb721 100644 --- a/src/fuse_readdir_cosr.cpp +++ b/src/fuse_readdir_cosr.cpp @@ -45,7 +45,7 @@ static inline int _readdir(ThreadPool &tp_, - const Branches::Ptr &branches_, + const Branches::Ptr branches_, const fs::path &rel_dirpath_, fuse_dirents_t *dirents_) { diff --git a/src/fuse_rename.cpp b/src/fuse_rename.cpp index aa86a5a9..ad550a2f 100644 --- a/src/fuse_rename.cpp +++ b/src/fuse_rename.cpp @@ -70,8 +70,8 @@ _remove(const StrVec &toremove_) static int _rename_create_path(const Policy::Search &searchPolicy_, - const Policy::Action &actionPolicy_, - const Branches::Ptr &branches_, + const Policy::Action &actionPolicy_, + const Branches::Ptr branches_, const fs::path &oldfusepath_, const fs::path &newfusepath_) { @@ -131,7 +131,7 @@ _rename_create_path(const Policy::Search &searchPolicy_, static int _rename_preserve_path(const Policy::Action &actionPolicy_, - const Branches::Ptr &branches_, + const Branches::Ptr branches_, const fs::path &oldfusepath_, const fs::path &newfusepath_) { @@ -202,7 +202,7 @@ _rename_exdev_rename_back(const std::vector &branches_, static int _rename_exdev_rename_target(const Policy::Action &actionPolicy_, - const Branches::Ptr &ibranches_, + const Branches::Ptr ibranches_, const fs::path &oldfusepath_, std::vector &obranches_) { @@ -249,8 +249,8 @@ _rename_exdev_rename_target(const Policy::Action &actionPolicy_, static int _rename_exdev_rel_symlink(const fuse_req_ctx_t *ctx_, - const Policy::Action &actionPolicy_, - const Branches::Ptr &branches_, + const Policy::Action &actionPolicy_, + const Branches::Ptr branches_, const fs::path &oldfusepath_, const fs::path &newfusepath_) { @@ -278,8 +278,8 @@ _rename_exdev_rel_symlink(const fuse_req_ctx_t *ctx_, static int _rename_exdev_abs_symlink(const fuse_req_ctx_t *ctx_, - const Policy::Action &actionPolicy_, - const Branches::Ptr &branches_, + const Policy::Action &actionPolicy_, + const Branches::Ptr branches_, const fs::path &mount_, const fs::path &oldfusepath_, const fs::path &newfusepath_)