diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 19 | ||||
-rw-r--r-- | fs/xfs/xfs_itable.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 3 |
3 files changed, 21 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index f2bbb327c081..0fe2419461d6 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -566,6 +566,25 @@ static inline int VN_BAD(struct vnode *vp) | |||
566 | } | 566 | } |
567 | 567 | ||
568 | /* | 568 | /* |
569 | * Extracting atime values in various formats | ||
570 | */ | ||
571 | static inline void vn_atime_to_bstime(struct vnode *vp, xfs_bstime_t *bs_atime) | ||
572 | { | ||
573 | bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; | ||
574 | bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; | ||
575 | } | ||
576 | |||
577 | static inline void vn_atime_to_timespec(struct vnode *vp, struct timespec *ts) | ||
578 | { | ||
579 | *ts = vp->v_inode.i_atime; | ||
580 | } | ||
581 | |||
582 | static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt) | ||
583 | { | ||
584 | *tt = vp->v_inode.i_atime.tv_sec; | ||
585 | } | ||
586 | |||
587 | /* | ||
569 | * Some useful predicates. | 588 | * Some useful predicates. |
570 | */ | 589 | */ |
571 | #define VN_MAPPED(vp) mapping_mapped(LINVFS_GET_IP(vp)->i_mapping) | 590 | #define VN_MAPPED(vp) mapping_mapped(LINVFS_GET_IP(vp)->i_mapping) |
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 41f50e7d1c32..c59450e1be40 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
@@ -86,9 +86,7 @@ xfs_bulkstat_one_iget( | |||
86 | buf->bs_uid = dic->di_uid; | 86 | buf->bs_uid = dic->di_uid; |
87 | buf->bs_gid = dic->di_gid; | 87 | buf->bs_gid = dic->di_gid; |
88 | buf->bs_size = dic->di_size; | 88 | buf->bs_size = dic->di_size; |
89 | /* atime is only kept uptodate in the Linux inode */ | 89 | vn_atime_to_bstime(vp, &buf->bs_atime); |
90 | buf->bs_atime.tv_sec = vp->v_inode.i_atime.tv_sec; | ||
91 | buf->bs_atime.tv_nsec = vp->v_inode.i_atime.tv_nsec; | ||
92 | buf->bs_mtime.tv_sec = dic->di_mtime.t_sec; | 90 | buf->bs_mtime.tv_sec = dic->di_mtime.t_sec; |
93 | buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec; | 91 | buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec; |
94 | buf->bs_ctime.tv_sec = dic->di_ctime.t_sec; | 92 | buf->bs_ctime.tv_sec = dic->di_ctime.t_sec; |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index b12fcfcb196d..f8916349a9c6 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -182,8 +182,7 @@ xfs_getattr( | |||
182 | break; | 182 | break; |
183 | } | 183 | } |
184 | 184 | ||
185 | /* atime is only kept uptodate in the Linux inode */ | 185 | vn_atime_to_timespec(vp, &vap->va_atime); |
186 | vap->va_atime = vp->v_inode.i_atime; | ||
187 | vap->va_mtime.tv_sec = ip->i_d.di_mtime.t_sec; | 186 | vap->va_mtime.tv_sec = ip->i_d.di_mtime.t_sec; |
188 | vap->va_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec; | 187 | vap->va_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec; |
189 | vap->va_ctime.tv_sec = ip->i_d.di_ctime.t_sec; | 188 | vap->va_ctime.tv_sec = ip->i_d.di_ctime.t_sec; |