]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/unit.c
Merge pull request #23558 from msekletar/issue-20329-followup
[thirdparty/systemd.git] / src / core / unit.c
index 31c5be4431aff4a5a27b540659c86205fe1633d9..180dccc2b291f85ec49a8f8a68408582626a0893 100644 (file)
@@ -1868,6 +1868,10 @@ int unit_start(Unit *u) {
 
         assert(u);
 
+        /* Let's hold off running start jobs for mount units when /proc/self/mountinfo monitor is rate limited. */
+        if (u->type == UNIT_MOUNT && sd_event_source_is_ratelimited(u->manager->mount_event_source))
+                return -EAGAIN;
+
         /* If this is already started, then this will succeed. Note that this will even succeed if this unit
          * is not startable by the user. This is relied on to detect when we need to wait for units and when
          * waiting is finished. */