diff options
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efivars.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index bee14cc47c03..fbe9202c2678 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -701,18 +701,13 @@ static int efi_pstore_write(enum pstore_type_id type, unsigned int part, size_t size, struct pstore_info *psi) { char name[DUMP_NAME_LEN]; - char stub_name[DUMP_NAME_LEN]; efi_char16_t efi_name[DUMP_NAME_LEN]; efi_guid_t vendor = LINUX_EFI_CRASH_GUID; struct efivars *efivars = psi->data; - struct efivar_entry *entry, *found = NULL; int i, ret = 0; u64 storage_space, remaining_space, max_variable_size; efi_status_t status = EFI_NOT_FOUND; - sprintf(stub_name, "dump-type%u-%u-", type, part); - sprintf(name, "%s%lu", stub_name, get_seconds()); - spin_lock(&efivars->lock); /* @@ -730,35 +725,8 @@ static int efi_pstore_write(enum pstore_type_id type, return -ENOSPC; } - for (i = 0; i < DUMP_NAME_LEN; i++) - efi_name[i] = stub_name[i]; - - /* - * Clean up any entries with the same name - */ - - list_for_each_entry(entry, &efivars->list, list) { - get_var_data_locked(efivars, &entry->var); - - if (efi_guidcmp(entry->var.VendorGuid, vendor)) - continue; - if (utf16_strncmp(entry->var.VariableName, efi_name, - utf16_strlen(efi_name))) - continue; - /* Needs to be a prefix */ - if (entry->var.VariableName[utf16_strlen(efi_name)] == 0) - continue; - - /* found */ - found = entry; - efivars->ops->set_variable(entry->var.VariableName, - &entry->var.VendorGuid, - PSTORE_EFI_ATTRIBUTES, - 0, NULL); - } - - if (found) - list_del(&found->list); + sprintf(name, "dump-type%u-%u-%lu", type, part, + get_seconds()); for (i = 0; i < DUMP_NAME_LEN; i++) efi_name[i] = name[i]; @@ -768,9 +736,6 @@ static int efi_pstore_write(enum pstore_type_id type, spin_unlock(&efivars->lock); - if (found) - efivar_unregister(found); - if (size) ret = efivar_create_sysfs_entry(efivars, utf16_strsize(efi_name, |