From 98861f0b5a3a211f8a27e7946dd35ebf7ccc6d2f Mon Sep 17 00:00:00 2001 From: LoveSy Date: Mon, 11 Dec 2023 10:51:02 +0800 Subject: [PATCH] Clone dir attr for tmpfs in advance --- native/src/core/module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/core/module.cpp b/native/src/core/module.cpp index 5279465e2..1cf16c537 100644 --- a/native/src/core/module.cpp +++ b/native/src/core/module.cpp @@ -169,10 +169,10 @@ void tmpfs_node::mount() { auto worker_dir = worker_path(); mkdirs(worker_dir.data(), 0); bind_mount("tmpfs", worker_dir.data(), worker_dir.data()); + clone_attr(src_path ?: parent()->node_path().data(), worker_dir.data()); dir_node::mount(); VLOGD(skip_mirror() ? "replace" : "move", worker_dir.data(), dest.data()); xmount(worker_dir.data(), dest.data(), nullptr, MS_MOVE, nullptr); - clone_attr(src_path ?: parent()->node_path().data(), dest.data()); } else { const string dest = worker_path(); // We don't need another layer of tmpfs if parent is tmpfs