diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-06-20 13:21:26 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-06-24 20:40:19 +0200 |
commit | 859748255b43460685e93a1f8a40b8cdc3be02f2 (patch) | |
tree | 487e7f9cf14b0a977ba2b037bf9d0a86ba29753c /drivers/firmware/efi/vars.c | |
parent | efi: vars: Add thin wrapper around EFI get/set variable interface (diff) | |
download | linux-859748255b43460685e93a1f8a40b8cdc3be02f2.tar.xz linux-859748255b43460685e93a1f8a40b8cdc3be02f2.zip |
efi: pstore: Omit efivars caching EFI varstore access layer
Avoid the efivars layer and simply call the newly introduced EFI
varstore helpers instead. This simplifies the code substantially, and
also allows us to remove some hacks in the shared efivars layer that
were added for efi-pstore specifically.
In order to be able to delete the EFI variable associated with a record,
store the UTF-16 name of the variable in the pstore record's priv field.
That way, we don't have to make guesses regarding which variable the
record may have been loaded from.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/vars.c')
-rw-r--r-- | drivers/firmware/efi/vars.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c index 41c82614a4b2..5640ffa81544 100644 --- a/drivers/firmware/efi/vars.c +++ b/drivers/firmware/efi/vars.c @@ -821,16 +821,8 @@ struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid, if (!found) return NULL; - if (remove) { - if (entry->scanning) { - /* - * The entry will be deleted - * after scanning is completed. - */ - entry->deleting = true; - } else - list_del(&entry->list); - } + if (remove) + list_del(&entry->list); return entry; } |