Skip to content

Commit c57b6e1

Browse files
jejbardbiesheuvel
authored andcommitted
efivarfs: remove unused efi_variable.Attributes and efivar_entry.kobj
These fields look to be remnants of older code: Attributes was likely meant to stash the variable attributes, but doesn't because we always read them from the variable store and kobj was likely left over from an older iteration of code where we manually created the objects instead of using a filesystem. [ ardb: these fields were used by the sysfs based 'efivars' precursor to efivarfs, which was removed in commit 0f5b2c6 ("efi: vars: Remove deprecated 'efivars' sysfs interface") ] Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent 78d4f34 commit c57b6e1

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

fs/efivarfs/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ struct efivarfs_fs_info {
2424
struct efi_variable {
2525
efi_char16_t VariableName[EFI_VAR_NAME_LEN/sizeof(efi_char16_t)];
2626
efi_guid_t VendorGuid;
27-
__u32 Attributes;
2827
};
2928

3029
struct efivar_entry {
3130
struct efi_variable var;
3231
struct list_head list;
33-
struct kobject kobj;
3432
};
3533

3634
int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *,

fs/efivarfs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static int efivarfs_callback(efi_char16_t *name16, efi_guid_t vendor,
245245

246246
inode_lock(inode);
247247
inode->i_private = entry;
248-
i_size_write(inode, size + sizeof(entry->var.Attributes));
248+
i_size_write(inode, size + sizeof(__u32)); /* attributes + data */
249249
inode_unlock(inode);
250250
d_add(dentry, inode);
251251

0 commit comments

Comments
 (0)