From: Tony Luck <tony.luck@intel.com>
Date: Thu, 28 May 2020 12:49:04 -0700
Subject: efivarfs: Update inode modification time for successful writes
Patch-mainline: v5.8-rc3
Git-commit: 2096721f1577b51b574fa06a7d91823dffe7267a
References: jsc#SLE-16407
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 <mzxreary@0pointer.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20200528194905.690-2-tony.luck@intel.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
---
fs/efivarfs/file.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/efivarfs/file.c
+++ b/fs/efivarfs/file.c
@@ -51,6 +51,7 @@ static ssize_t efivarfs_file_write(struc
} else {
inode_lock(inode);
i_size_write(inode, datasize + sizeof(attributes));
+ inode->i_mtime = current_time(inode);
inode_unlock(inode);
}