commit | 8f713c56bbd80104472cbe64e99c0a017495b9ee | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Jul 08 21:38:13 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jul 08 21:38:13 2020 +0000 |
tree | 3a8d6439b5347fef50a94f2f1a279caae06b31cc | |
parent | dee7426a9b9579c2d3eaaeeff037d7cc6dc1aa47 [diff] | |
parent | 9e84b3166fb1f8f8f2cb6d34c4760bcef774479c [diff] |
Merge changes I51628abe,I412d62b7 am: 9e84b3166f Original change: https://android-review.googlesource.com/c/platform/system/core/+/1358184 Change-Id: Ia7b7e643c2326fb49ad0966dd1b69339650b6801
diff --git a/fs_mgr/libsnapshot/snapshot.cpp b/fs_mgr/libsnapshot/snapshot.cpp index 688b658..7488bda 100644 --- a/fs_mgr/libsnapshot/snapshot.cpp +++ b/fs_mgr/libsnapshot/snapshot.cpp
@@ -1846,7 +1846,7 @@ 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 @@ } 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_; } }