Merge "Fsync directories before delete key"
This commit is contained in:
commit
7573874d3f
1 changed files with 4 additions and 0 deletions
|
@ -224,6 +224,10 @@ static KeymasterOperation begin(Keymaster& keymaster, const std::string& dir,
|
|||
PLOG(ERROR) << "Unable to move upgraded key to location: " << kmKeyPath;
|
||||
return KeymasterOperation();
|
||||
}
|
||||
if (!android::vold::FsyncDirectory(dir)) {
|
||||
LOG(ERROR) << "Key dir sync failed: " << dir;
|
||||
return KeymasterOperation();
|
||||
}
|
||||
if (!keymaster.deleteKey(kmKey)) {
|
||||
LOG(ERROR) << "Key deletion failed during upgrade, continuing anyway: " << dir;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue