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

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

Change-Id: Id8a55df412d8d0b48ead3a8fdc382dcc902545da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
David Anderson 2022-12-15 19:23:25 +00:00 committed by Automerger Merge Worker
commit 856548eb2d

View file

@ -90,15 +90,7 @@ void defaultkey_precreate_dm_device() {
return;
}
// On newer Linux kernels (5.15+), there is no uevent until DM_TABLE_LOAD,
// 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)) {
if (!dm.CreatePlaceholderDevice(kDmNameUserdata)) {
LOG(ERROR) << "Failed to pre-create userdata metadata encryption device";
}
}