]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/mount: mount command may fail after adding the corresponding proc mountinfo...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Nov 2020 00:13:59 +0000 (09:13 +0900)
committerLennart Poettering <lennart@poettering.net>
Wed, 25 Nov 2020 12:53:26 +0000 (13:53 +0100)
Hopefully fixes #17617.

src/core/mount.c

index faa2cb0e039dfe16dc4ecbbd07309a52b53ff8fd..8e83de0ba89c2138afe81322b5eb9019bdbd86b5 100644 (file)
@@ -1948,6 +1948,15 @@ static int mount_process_proc_self_mountinfo(Manager *m) {
                                 mount_enter_dead(mount, MOUNT_SUCCESS);
                                 break;
 
+                        case MOUNT_MOUNTING_DONE:
+                                /* The mount command may add the corresponding proc mountinfo entry and
+                                 * then remove it because of an internal error. E.g., fuse.sshfs seems
+                                 * to do that when the connection fails. See #17617. To handle such the
+                                 * case, let's once set the state back to mounting. Then, the unit can
+                                 * correctly enter the failed state later in mount_sigchld(). */
+                                mount_set_state(mount, MOUNT_MOUNTING);
+                                break;
+
                         default:
                                 break;
                         }