mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
Avoid looping forever trying to unmount busy tmpfs
This split unmount is a bit crude, unfortunately. A user may have set up a bind or overlayfs mount on top of a tmpfs -- so unmounting tmpfs first will then always result in EBUSY. Avoid logging busy errors and fake OK. We'll catch it later in the second stage unmount. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+4
-2
@@ -94,10 +94,12 @@ static int unmount(const char *target)
|
||||
int rc;
|
||||
|
||||
rc = umount(target);
|
||||
if (rc)
|
||||
if (rc && errno != EBUSY) {
|
||||
print(2, "Failed unmounting %s, error %d: %s", target, errno, strerror(errno));
|
||||
return rc;
|
||||
}
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void unmount_tmpfs(void)
|
||||
|
||||
Reference in New Issue
Block a user