提交 582a7344 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

xfs: handle crtime more carefully in xfs_bulkstat_one_int

The crtime only exists for v5 inodes, so only copy it for those.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
上级 4cb6f2e8
......@@ -99,8 +99,6 @@ xfs_bulkstat_one_int(
buf->bs_mtime_nsec = inode->i_mtime.tv_nsec;
buf->bs_ctime = inode->i_ctime.tv_sec;
buf->bs_ctime_nsec = inode->i_ctime.tv_nsec;
buf->bs_btime = dic->di_crtime.tv_sec;
buf->bs_btime_nsec = dic->di_crtime.tv_nsec;
buf->bs_gen = inode->i_generation;
buf->bs_mode = inode->i_mode;
......@@ -113,6 +111,8 @@ xfs_bulkstat_one_int(
buf->bs_version = XFS_BULKSTAT_VERSION_V5;
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
buf->bs_btime = dic->di_crtime.tv_sec;
buf->bs_btime_nsec = dic->di_crtime.tv_nsec;
if (dic->di_flags2 & XFS_DIFLAG2_COWEXTSIZE)
buf->bs_cowextsize_blks = dic->di_cowextsize;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册