diff --git a/services/storage_daemon/crypto/src/fscrypt_key_v1.cpp b/services/storage_daemon/crypto/src/fscrypt_key_v1.cpp index 73016b0596e78f1be155620873200009f20bedba..2307a4b33b6ed2e55295f15a87f7aeb408075209 100644 --- a/services/storage_daemon/crypto/src/fscrypt_key_v1.cpp +++ b/services/storage_daemon/crypto/src/fscrypt_key_v1.cpp @@ -426,13 +426,13 @@ bool FscryptKeyV1::InactiveKey(uint32_t flag, const std::string &mnt) { (void)mnt; LOGI("enter"); - bool ret = true; + DropCachesIfNeed(); + bool ret = true; if (!keyInfo_.keyDesc.IsEmpty() && !UninstallKeyToKeyring()) { LOGE("UninstallKeyToKeyring failed"); ret = false; } - DropCachesIfNeed(); if (!fscryptV1Ext.InactiveKeyExt(flag)) { LOGE("fscryptV1Ext InactiveKeyExt failed"); ret = false;