isofs: convert to ctime accessor functions
In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Signed-off-by: Jeff Layton <jlayton@kernel.org> Message-Id: <20230705190309.579783-51-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Родитель
a72a7deab6
Коммит
2f06e4ba90
|
@ -1422,13 +1422,8 @@ static int isofs_read_inode(struct inode *inode, int relocated)
|
|||
inode->i_ino, de->flags[-high_sierra]);
|
||||
}
|
||||
#endif
|
||||
|
||||
inode->i_mtime.tv_sec =
|
||||
inode->i_atime.tv_sec =
|
||||
inode->i_ctime.tv_sec = iso_date(de->date, high_sierra);
|
||||
inode->i_mtime.tv_nsec =
|
||||
inode->i_atime.tv_nsec =
|
||||
inode->i_ctime.tv_nsec = 0;
|
||||
inode->i_mtime = inode->i_atime =
|
||||
inode_set_ctime(inode, iso_date(de->date, high_sierra), 0);
|
||||
|
||||
ei->i_first_extent = (isonum_733(de->extent) +
|
||||
isonum_711(de->ext_attr_length));
|
||||
|
|
|
@ -421,10 +421,9 @@ repeat:
|
|||
/* 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_set_ctime(inode,
|
||||
iso_date(rr->u.TF.times[cnt++].time, 0),
|
||||
0);
|
||||
}
|
||||
if (rr->u.TF.flags & TF_MODIFY) {
|
||||
inode->i_mtime.tv_sec =
|
||||
|
@ -439,10 +438,9 @@ repeat:
|
|||
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_set_ctime(inode,
|
||||
iso_date(rr->u.TF.times[cnt++].time, 0),
|
||||
0);
|
||||
}
|
||||
break;
|
||||
case SIG('S', 'L'):
|
||||
|
@ -534,7 +532,7 @@ repeat:
|
|||
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_set_ctime_to_ts(inode, inode_get_ctime(reloc));
|
||||
inode->i_mtime = reloc->i_mtime;
|
||||
iput(reloc);
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче