]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "core/mount: fail early if directory cannot be created"
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 26 Jul 2022 14:15:01 +0000 (23:15 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 26 Jul 2022 16:13:27 +0000 (01:13 +0900)
This reverts commit e4de58c8231e47509ffeb3aa47620ca42f22d7f6.

If mkdir() fails and the path does exist, then the later mount
command fails anyway. Hence, it is not necessary to fail here.

Fixes #24120.

src/core/mount.c

index 836ba132cb912f1a23fc08c52ec43fe81ca86bd0..015a77221afb2aa3c971058a4e449678c70c27ba 100644 (file)
@@ -1054,10 +1054,8 @@ static void mount_enter_mounting(Mount *m) {
                 r = mkdir_p_label(p->what, m->directory_mode);
                 /* mkdir_p_label() can return -EEXIST if the target path exists and is not a directory - which is
                  * totally OK, in case the user wants us to overmount a non-directory inode. */
-                if (r < 0 && r != -EEXIST) {
+                if (r < 0 && r != -EEXIST)
                         log_unit_error_errno(UNIT(m), r, "Failed to make bind mount source '%s': %m", p->what);
-                        goto fail;
-                }
         }
 
         if (p) {