summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/file.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-08-07 21:38:37 +0200
committerChristian Brauner <brauner@kernel.org>2023-08-11 09:03:34 +0200
commit97ebfdb7ad089d5213f6c75fdc48173fe0f14439 (patch)
tree06fd730b998f94fcb1b974a04865fdcb736fc06e /fs/ubifs/file.c
parentbtrfs: have it use inode_update_timestamps (diff)
downloadlinux-97ebfdb7ad089d5213f6c75fdc48173fe0f14439.tar.xz
linux-97ebfdb7ad089d5213f6c75fdc48173fe0f14439.zip
ubifs: have ubifs_update_time use inode_update_timestamps
In later patches, we're going to drop the "now" parameter from the update_time operation. Prepare ubifs for this, by having it use the new inode_update_timestamps helper. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230807-mgctime-v7-6-d1dec143a704@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r--fs/ubifs/file.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index df9086b19cd0..81d44a1b2414 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1397,13 +1397,7 @@ int ubifs_update_time(struct inode *inode, struct timespec64 *time,
return err;
mutex_lock(&ui->ui_mutex);
- if (flags & S_ATIME)
- inode->i_atime = *time;
- if (flags & S_CTIME)
- inode_set_ctime_to_ts(inode, *time);
- if (flags & S_MTIME)
- inode->i_mtime = *time;
-
+ inode_update_timestamps(inode, flags);
release = ui->dirty;
__mark_inode_dirty(inode, I_DIRTY_SYNC);
mutex_unlock(&ui->ui_mutex);