From 43d45a1ccf4999e4b70d2e46382fbe48ebabc983 Mon Sep 17 00:00:00 2001 From: zky Date: Fri, 24 Feb 2023 15:41:44 +0800 Subject: [PATCH] bugfix: mount add MS_SYNCHRONOUS. Signed-off-by: zky --- interfaces/innerkits/native/file_share/src/file_share.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/innerkits/native/file_share/src/file_share.cpp b/interfaces/innerkits/native/file_share/src/file_share.cpp index 15f74aa32..5831f721a 100644 --- a/interfaces/innerkits/native/file_share/src/file_share.cpp +++ b/interfaces/innerkits/native/file_share/src/file_share.cpp @@ -302,7 +302,7 @@ int32_t FileShare::CreateShareFile(const string &uri, int32_t tokenId, int32_t f } if (mount(info.providerLowerPath_.c_str(), info.sharePath_[i].c_str(), - nullptr, MS_BIND, nullptr) != 0) { + nullptr, MS_BIND | MS_SYNCHRONOUS, nullptr) != 0) { LOGE("Mount failed with %{public}d", errno); return -errno; } -- Gitee