[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230621144735.55953-39-jlayton@kernel.org>
Date: Wed, 21 Jun 2023 10:45:53 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>
Cc: Al Viro <viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 40/79] isofs: switch to new ctime accessors
In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@...nel.org>
---
fs/isofs/inode.c | 4 ++--
fs/isofs/rock.c | 16 +++++++---------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index df9d70588b60..035fa0271d6e 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -1425,10 +1425,10 @@ static int isofs_read_inode(struct inode *inode, int relocated)
inode->i_mtime.tv_sec =
inode->i_atime.tv_sec =
- inode->i_ctime.tv_sec = iso_date(de->date, high_sierra);
+ inode_ctime_set_sec(inode, iso_date(de->date, high_sierra));
inode->i_mtime.tv_nsec =
inode->i_atime.tv_nsec =
- inode->i_ctime.tv_nsec = 0;
+ inode_ctime_set_nsec(inode, 0);
ei->i_first_extent = (isonum_733(de->extent) +
isonum_711(de->ext_attr_length));
diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c
index 48f58c6c9e69..6b7f2a62124d 100644
--- a/fs/isofs/rock.c
+++ b/fs/isofs/rock.c
@@ -421,10 +421,9 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
/* Rock ridge never appears on a High Sierra disk */
cnt = 0;
if (rr->u.TF.flags & TF_CREATE) {
- inode->i_ctime.tv_sec =
- iso_date(rr->u.TF.times[cnt++].time,
- 0);
- inode->i_ctime.tv_nsec = 0;
+ inode_ctime_set_sec(inode,
+ iso_date(rr->u.TF.times[cnt++].time, 0));
+ inode_ctime_set_nsec(inode, 0);
}
if (rr->u.TF.flags & TF_MODIFY) {
inode->i_mtime.tv_sec =
@@ -439,10 +438,9 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
inode->i_atime.tv_nsec = 0;
}
if (rr->u.TF.flags & TF_ATTRIBUTES) {
- inode->i_ctime.tv_sec =
- iso_date(rr->u.TF.times[cnt++].time,
- 0);
- inode->i_ctime.tv_nsec = 0;
+ inode_ctime_set_sec(inode,
+ iso_date(rr->u.TF.times[cnt++].time, 0));
+ inode_ctime_set_nsec(inode, 0);
}
break;
case SIG('S', 'L'):
@@ -534,7 +532,7 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
inode->i_size = reloc->i_size;
inode->i_blocks = reloc->i_blocks;
inode->i_atime = reloc->i_atime;
- inode->i_ctime = reloc->i_ctime;
+ inode_ctime_set(inode, inode_ctime_peek(reloc));
inode->i_mtime = reloc->i_mtime;
iput(reloc);
break;
--
2.41.0
Powered by blists - more mailing lists