lkml.org 
[lkml]   [2023]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH v7 06/13] 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>
---
fs/ubifs/file.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index df9086b19cd0..2d0178922e19 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1397,15 +1397,9 @@ 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;
-
- release = ui->dirty;
+ inode_update_timestamps(inode, flags);
__mark_inode_dirty(inode, I_DIRTY_SYNC);
+ release = ui->dirty;
mutex_unlock(&ui->ui_mutex);
if (release)
ubifs_release_budget(c, &req);
--
2.41.0

\
 
 \ /
  Last update: 2023-08-07 21:41    [W:0.281 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site