8 Star 0 Fork 48

src-anolis-os/systemd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0726-core-mount-add-implicit-unit-dependencies-even-if-wh.patch 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:44 . update to systemd-239-58.el8.src.rpm
From 1fb992c50f7fc6a5c399e302ba79097d36a0cedf Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sun, 29 Aug 2021 21:20:43 +0900
Subject: [PATCH] core/mount: add implicit unit dependencies even if when mount
unit is generated from /proc/self/mountinfo
Hopefully fixes #20566.
(cherry picked from commit aebff2e7ce209fc2d75b894a3ae8b80f6f36ec11)
Resolves: #2008825
---
src/core/mount.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 73c0531158..9547cb9b29 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1437,6 +1437,7 @@ static int mount_setup_new_unit(
MountSetupFlags *flags) {
MountParameters *p;
+ int r;
assert(u);
assert(flags);
@@ -1458,7 +1459,6 @@ static int mount_setup_new_unit(
if (!mount_is_extrinsic(MOUNT(u))) {
const char *target;
- int r;
target = mount_is_network(p) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true, UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT);
@@ -1470,6 +1470,10 @@ static int mount_setup_new_unit(
return r;
}
+ r = mount_add_non_exec_dependencies(MOUNT(u));
+ if (r < 0)
+ return r;
+
unit_add_to_load_queue(u);
flags->is_mounted = true;
flags->just_mounted = true;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/systemd.git
git@gitee.com:src-anolis-os/systemd.git
src-anolis-os
systemd
systemd
a8

搜索帮助