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

Commit 8f713c56 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I51628abe,I412d62b7 am: 9e84b316

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1358184

Change-Id: Ia7b7e643c2326fb49ad0966dd1b69339650b6801
parents dee7426a 9e84b316
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1846,7 +1846,7 @@ auto SnapshotManager::OpenFile(const std::string& file, int lock_flags)
        PLOG(ERROR) << "Open failed: " << file;
        return nullptr;
    }
    if (lock_flags != 0 && flock(fd, lock_flags) < 0) {
    if (lock_flags != 0 && TEMP_FAILURE_RETRY(flock(fd, lock_flags)) < 0) {
        PLOG(ERROR) << "Acquire flock failed: " << file;
        return nullptr;
    }
@@ -1857,7 +1857,7 @@ auto SnapshotManager::OpenFile(const std::string& file, int lock_flags)
}

SnapshotManager::LockedFile::~LockedFile() {
    if (flock(fd_, LOCK_UN) < 0) {
    if (TEMP_FAILURE_RETRY(flock(fd_, LOCK_UN)) < 0) {
        PLOG(ERROR) << "Failed to unlock file: " << path_;
    }
}