Commit 702ed7f1 authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

orangefs: convert to new timestamp accessors

Convert to using the new inode timestamp accessor functions.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-57-jlayton@kernel.orgSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 76daf9b1
...@@ -155,14 +155,14 @@ static inline void copy_attributes_from_inode(struct inode *inode, ...@@ -155,14 +155,14 @@ static inline void copy_attributes_from_inode(struct inode *inode,
if (orangefs_inode->attr_valid & ATTR_ATIME) { if (orangefs_inode->attr_valid & ATTR_ATIME) {
attrs->mask |= ORANGEFS_ATTR_SYS_ATIME; attrs->mask |= ORANGEFS_ATTR_SYS_ATIME;
if (orangefs_inode->attr_valid & ATTR_ATIME_SET) { if (orangefs_inode->attr_valid & ATTR_ATIME_SET) {
attrs->atime = (time64_t)inode->i_atime.tv_sec; attrs->atime = (time64_t) inode_get_atime_sec(inode);
attrs->mask |= ORANGEFS_ATTR_SYS_ATIME_SET; attrs->mask |= ORANGEFS_ATTR_SYS_ATIME_SET;
} }
} }
if (orangefs_inode->attr_valid & ATTR_MTIME) { if (orangefs_inode->attr_valid & ATTR_MTIME) {
attrs->mask |= ORANGEFS_ATTR_SYS_MTIME; attrs->mask |= ORANGEFS_ATTR_SYS_MTIME;
if (orangefs_inode->attr_valid & ATTR_MTIME_SET) { if (orangefs_inode->attr_valid & ATTR_MTIME_SET) {
attrs->mtime = (time64_t)inode->i_mtime.tv_sec; attrs->mtime = (time64_t) inode_get_mtime_sec(inode);
attrs->mask |= ORANGEFS_ATTR_SYS_MTIME_SET; attrs->mask |= ORANGEFS_ATTR_SYS_MTIME_SET;
} }
} }
...@@ -357,15 +357,15 @@ int orangefs_inode_getattr(struct inode *inode, int flags) ...@@ -357,15 +357,15 @@ int orangefs_inode_getattr(struct inode *inode, int flags)
downcall.resp.getattr.attributes.owner); downcall.resp.getattr.attributes.owner);
inode->i_gid = make_kgid(&init_user_ns, new_op-> inode->i_gid = make_kgid(&init_user_ns, new_op->
downcall.resp.getattr.attributes.group); downcall.resp.getattr.attributes.group);
inode->i_atime.tv_sec = (time64_t)new_op-> inode_set_atime(inode,
downcall.resp.getattr.attributes.atime; (time64_t)new_op->downcall.resp.getattr.attributes.atime,
inode->i_mtime.tv_sec = (time64_t)new_op-> 0);
downcall.resp.getattr.attributes.mtime; inode_set_mtime(inode,
(time64_t)new_op->downcall.resp.getattr.attributes.mtime,
0);
inode_set_ctime(inode, inode_set_ctime(inode,
(time64_t)new_op->downcall.resp.getattr.attributes.ctime, (time64_t)new_op->downcall.resp.getattr.attributes.ctime,
0); 0);
inode->i_atime.tv_nsec = 0;
inode->i_mtime.tv_nsec = 0;
/* special case: mark the root inode as sticky */ /* special case: mark the root inode as sticky */
inode->i_mode = type | (is_root_handle(inode) ? S_ISVTX : 0) | inode->i_mode = type | (is_root_handle(inode) ? S_ISVTX : 0) |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment