Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 611f5e96 authored by Mohamad Ayyash's avatar Mohamad Ayyash Committed by JP Abgrall
Browse files

fs_mgr: fix mount_all when handling already mounted encryptable fs.

Since 38afe5f4
  fs_mgr_mount_all() will try to behave more like "mount -a"

So prevent inaccessible or busy (already mounted) encryptable filesystems
from mounting tmpfs in their mount points.


Change-Id: I32e5b3e26f2138d1e4d9ef8ba01c1466f8051d39
parent 38afe5f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -260,9 +260,9 @@ int fs_mgr_mount_all(struct fstab *fstab)

        /* back up errno as partition_wipe clobbers the value */
        mount_errno = errno;

        /* mount(2) returned an error, check if it's encryptable and deal with it */
        if ((fstab->recs[i].fs_mgr_flags & MF_CRYPT) &&
        if (mount_errno != EBUSY && mount_errno != EACCES &&
            (fstab->recs[i].fs_mgr_flags & MF_CRYPT) &&
            !partition_wiped(fstab->recs[i].blk_device)) {
            /* Need to mount a tmpfs at this mountpoint for now, and set
             * properties that vold will query later for decrypting