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

Commit 8cd0f23d authored by Chaitanya Cheemala (xWF)'s avatar Chaitanya Cheemala (xWF) Committed by Gerrit Code Review
Browse files

Merge "Revert^3 "Set block device as RO/RW before mount"" into main

parents 1aaf2384 1df3536b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -823,9 +823,6 @@ static int __mount(const std::string& source, const std::string& target, const F
    if (read_only) {
        mountflags |= MS_RDONLY;
    }
    if (!fs_mgr_set_blk_ro(source, read_only)) {
        PLOG(ERROR) << "Failed to set " << source << " as " << (read_only ? "RO" : "RW");
    }
    int ret = 0;
    int save_errno = 0;
    int gc_allowance = 0;
@@ -880,6 +877,9 @@ static int __mount(const std::string& source, const std::string& target, const F
    }
    PINFO << __FUNCTION__ << "(source=" << source << source_missing << ",target=" << target
          << target_missing << ",type=" << entry.fs_type << ")=" << ret;
    if ((ret == 0) && (mountflags & MS_RDONLY) != 0) {
        fs_mgr_set_blk_ro(source);
    }
    if (ret == 0) {
        android::base::SetProperty("ro.boottime.init.mount." + Basename(target),
                                   std::to_string(t.duration().count()));