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>
This commit is contained in:
parent
24bcb45429
commit
e60feb445f
2 changed files with 6 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue