mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
afs: convert to new timestamp accessors
Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20231004185347.80880-16-jlayton@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
ea7719af1b
commit
562ce1f754
@ -88,7 +88,7 @@ struct inode *afs_iget_pseudo_dir(struct super_block *sb, bool root)
|
||||
set_nlink(inode, 2);
|
||||
inode->i_uid = GLOBAL_ROOT_UID;
|
||||
inode->i_gid = GLOBAL_ROOT_GID;
|
||||
inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
|
||||
simple_inode_init_ts(inode);
|
||||
inode->i_blocks = 0;
|
||||
inode->i_generation = 0;
|
||||
|
||||
|
@ -91,8 +91,8 @@ static int afs_inode_init_from_status(struct afs_operation *op,
|
||||
|
||||
t = status->mtime_client;
|
||||
inode_set_ctime_to_ts(inode, t);
|
||||
inode->i_mtime = t;
|
||||
inode->i_atime = t;
|
||||
inode_set_mtime_to_ts(inode, t);
|
||||
inode_set_atime_to_ts(inode, t);
|
||||
inode->i_flags |= S_NOATIME;
|
||||
inode->i_uid = make_kuid(&init_user_ns, status->owner);
|
||||
inode->i_gid = make_kgid(&init_user_ns, status->group);
|
||||
@ -204,7 +204,7 @@ static void afs_apply_status(struct afs_operation *op,
|
||||
}
|
||||
|
||||
t = status->mtime_client;
|
||||
inode->i_mtime = t;
|
||||
inode_set_mtime_to_ts(inode, t);
|
||||
if (vp->update_ctime)
|
||||
inode_set_ctime_to_ts(inode, op->ctime);
|
||||
|
||||
@ -253,7 +253,7 @@ static void afs_apply_status(struct afs_operation *op,
|
||||
if (change_size) {
|
||||
afs_set_i_size(vnode, status->size);
|
||||
inode_set_ctime_to_ts(inode, t);
|
||||
inode->i_atime = t;
|
||||
inode_set_atime_to_ts(inode, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ try_next_key:
|
||||
|
||||
op->store.write_iter = iter;
|
||||
op->store.i_size = max(pos + size, vnode->netfs.remote_i_size);
|
||||
op->mtime = vnode->netfs.inode.i_mtime;
|
||||
op->mtime = inode_get_mtime(&vnode->netfs.inode);
|
||||
|
||||
afs_wait_for_operation(op);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user