Skip to content

Commit

Permalink
Fix check for whether metadata encryption is enabled
Browse files Browse the repository at this point in the history
metadata_key_dir controls whether metadata encryption is enabled, not
metadata_encryption which is just the encryption options and can be
empty if the default options are sufficient.

Bug: 198405417
Fixes: 156d9d2 ("Pre-create userdata metadata encryption device.")
Change-Id: I98ee253c7e5e738ee087ec07ed60f4a376ca7cee
  • Loading branch information
ebiggers committed Mar 17, 2022
1 parent e7dbc48 commit f14f862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ static int process_config(VolumeManager* vm, VoldConfigs* configs) {
PLOG(FATAL) << "could not find logical partition " << entry.blk_device;
}

if (entry.mount_point == "/data" && !entry.metadata_encryption.empty()) {
if (entry.mount_point == "/data" && !entry.metadata_key_dir.empty()) {
// Pre-populate userdata dm-devices since the uevents are asynchronous (b/198405417).
android::vold::defaultkey_precreate_dm_device();
}
Expand Down

0 comments on commit f14f862

Please sign in to comment.