aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Luck <[email protected]>2020-05-28 19:49:04 +0000
committerArd Biesheuvel <[email protected]>2020-06-15 12:38:56 +0000
commit2096721f1577b51b574fa06a7d91823dffe7267a (patch)
tree493d009afc55e0250a9518233a77b8cbbb6cd7eb
parentefi/esrt: Fix reference count leak in esre_create_sysfs_entry. (diff)
downloadkernel-2096721f1577b51b574fa06a7d91823dffe7267a.tar.gz
kernel-2096721f1577b51b574fa06a7d91823dffe7267a.zip
efivarfs: Update inode modification time for successful writes
Some applications want to be able to see when EFI variables have been updated. Update the modification time for successful writes. Reported-by: Lennart Poettering <[email protected]> Signed-off-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
-rw-r--r--fs/efivarfs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c
index e9e27a271af0..4b8bc4560d70 100644
--- a/fs/efivarfs/file.c
+++ b/fs/efivarfs/file.c
@@ -51,6 +51,7 @@ static ssize_t efivarfs_file_write(struct file *file,
} else {
inode_lock(inode);
i_size_write(inode, datasize + sizeof(attributes));
+ inode->i_mtime = current_time(inode);
inode_unlock(inode);
}