Merge changes I51628abe,I412d62b7 am: 9e84b3166f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1358184 Change-Id: Ia7b7e643c2326fb49ad0966dd1b69339650b6801
This commit is contained in:
commit
8f713c56bb
1 changed files with 2 additions and 2 deletions
|
|
@ -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_;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue