diff options
author | Christoph Hellwig <hch@lst.de> | 2021-03-29 11:11:37 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-07 14:37:02 -0700 |
commit | 582a73440bf5cafbb469025ce60e11cb401416e1 (patch) | |
tree | ac78e29595313f81c290c675a165308784ce8bb3 /fs/xfs | |
parent | 4cb6f2e8c2c78c28941c56f49f2d9de44705b211 (diff) | |
download | linux-582a73440bf5cafbb469025ce60e11cb401416e1.tar.bz2 |
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_itable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 3498b97fb06d..5593d50835c7 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -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; } |