Merge "Skip new userdata pre-create logic on kernels < 5.15." am: 1bb7a963c0

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2352584

Change-Id: I8679e8f50a3797397afc806efc67ee8542733cc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
David Anderson 2022-12-15 18:08:05 +00:00 committed by Automerger Merge Worker
commit 3561a10403

View file

@ -90,15 +90,7 @@ void defaultkey_precreate_dm_device() {
return; return;
} }
// On newer Linux kernels (5.15+), there is no uevent until DM_TABLE_LOAD, if (!dm.CreatePlaceholderDevice(kDmNameUserdata)) {
// so we make sure the device is fully ready.
if (!dm.CreateEmptyDevice(kDmNameUserdata)) {
LOG(ERROR) << "Failed to pre-create userdata metadata encryption device";
}
DmTable table;
table.Emplace<DmTargetError>(0, 1);
if (!dm.LoadTable(kDmNameUserdata, table)) {
LOG(ERROR) << "Failed to pre-create userdata metadata encryption device"; LOG(ERROR) << "Failed to pre-create userdata metadata encryption device";
} }
} }