diff options
author | Josef Bacik | 2021-10-14 13:11:00 -0400 |
---|---|---|
committer | David Sterba | 2021-10-26 19:08:08 +0200 |
commit | e60feb445fce9e51c1558a6aa7faf9dd5ded533b (patch) | |
tree | 8e294e906c689646e276f52c0c3acbcbf5e6194c /include/linux/fs.h | |
parent | 24bcb45429d924711576856b26c99ad3375b1e12 (diff) |
fs: export an inode_update_time helper
If you already have an inode and need to update the time on the inode
there is no way to do this properly. Export this helper to allow file
systems to update time on the inode so the appropriate handler is
called, either ->update_time or generic_update_time.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index e7a633353fd2..56eba723477e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2498,6 +2498,8 @@ enum file_time_flags { extern bool atime_needs_update(const struct path *, struct inode *); extern void touch_atime(const struct path *); +int inode_update_time(struct inode *inode, struct timespec64 *time, int flags); + static inline void file_accessed(struct file *file) { if (!(file->f_flags & O_NOATIME)) |