summaryrefslogtreecommitdiff
path: root/fs/efivarfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-07-05 22:00:30 +0300
committerChristian Brauner <brauner@kernel.org>2023-07-10 11:04:51 +0300
commit73e6730650791072681b527aa132a126ed3681b5 (patch)
tree93eb59f58842e640769696a7e463e6256b1d5ecd /fs/efivarfs
parenta4440d741eb3d65edbcec13f2d8a0384548dd841 (diff)
downloadlinux-73e6730650791072681b527aa132a126ed3681b5.tar.xz
efivarfs: update ctime when mtime changes on a write
POSIX says: "Upon successful completion, where nbyte is greater than 0, write() shall mark for update the last data modification and last file status change timestamps of the file..." Add the missing ctime update. Signed-off-by: Jeff Layton <jlayton@kernel.org> Message-Id: <20230705190309.579783-3-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/efivarfs')
-rw-r--r--fs/efivarfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c
index d57ee15874f9..375576111dc3 100644
--- a/fs/efivarfs/file.c
+++ b/fs/efivarfs/file.c
@@ -51,7 +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->i_mtime = inode->i_ctime = current_time(inode);
inode_unlock(inode);
}