mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
[XFS] Fix some build fallout from atime changes.
SGI-PV: 946679 SGI-Modid: xfs-linux-melb:xfs-kern:24899a Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
parent
1259845d3f
commit
ca5ccbf98d
3 changed files with 21 additions and 5 deletions
|
@ -565,6 +565,25 @@ static inline int VN_BAD(struct vnode *vp)
|
||||||
return is_bad_inode(LINVFS_GET_IP(vp));
|
return is_bad_inode(LINVFS_GET_IP(vp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extracting atime values in various formats
|
||||||
|
*/
|
||||||
|
static inline void vn_atime_to_bstime(struct vnode *vp, xfs_bstime_t *bs_atime)
|
||||||
|
{
|
||||||
|
bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec;
|
||||||
|
bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void vn_atime_to_timespec(struct vnode *vp, struct timespec *ts)
|
||||||
|
{
|
||||||
|
*ts = vp->v_inode.i_atime;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt)
|
||||||
|
{
|
||||||
|
*tt = vp->v_inode.i_atime.tv_sec;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some useful predicates.
|
* Some useful predicates.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -86,9 +86,7 @@ xfs_bulkstat_one_iget(
|
||||||
buf->bs_uid = dic->di_uid;
|
buf->bs_uid = dic->di_uid;
|
||||||
buf->bs_gid = dic->di_gid;
|
buf->bs_gid = dic->di_gid;
|
||||||
buf->bs_size = dic->di_size;
|
buf->bs_size = dic->di_size;
|
||||||
/* atime is only kept uptodate in the Linux inode */
|
vn_atime_to_bstime(vp, &buf->bs_atime);
|
||||||
buf->bs_atime.tv_sec = vp->v_inode.i_atime.tv_sec;
|
|
||||||
buf->bs_atime.tv_nsec = vp->v_inode.i_atime.tv_nsec;
|
|
||||||
buf->bs_mtime.tv_sec = dic->di_mtime.t_sec;
|
buf->bs_mtime.tv_sec = dic->di_mtime.t_sec;
|
||||||
buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec;
|
buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec;
|
||||||
buf->bs_ctime.tv_sec = dic->di_ctime.t_sec;
|
buf->bs_ctime.tv_sec = dic->di_ctime.t_sec;
|
||||||
|
|
|
@ -182,8 +182,7 @@ xfs_getattr(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* atime is only kept uptodate in the Linux inode */
|
vn_atime_to_timespec(vp, &vap->va_atime);
|
||||||
vap->va_atime = vp->v_inode.i_atime;
|
|
||||||
vap->va_mtime.tv_sec = ip->i_d.di_mtime.t_sec;
|
vap->va_mtime.tv_sec = ip->i_d.di_mtime.t_sec;
|
||||||
vap->va_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec;
|
vap->va_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec;
|
||||||
vap->va_ctime.tv_sec = ip->i_d.di_ctime.t_sec;
|
vap->va_ctime.tv_sec = ip->i_d.di_ctime.t_sec;
|
||||||
|
|
Loading…
Reference in a new issue