Merge tag 'xfs-6.7-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-2.6-block.git] / fs / xfs / libxfs / xfs_rtbitmap.c
index b332ab490a4875e32c542c885f2b0d9bfeb202a4..c269d704314d7d5afc0497985f46c936ea275f27 100644 (file)
@@ -943,6 +943,7 @@ xfs_rtfree_extent(
                .tp             = tp,
        };
        int                     error;
+       struct timespec64       atime;
 
        ASSERT(mp->m_rbmip->i_itemp != NULL);
        ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
@@ -970,7 +971,10 @@ xfs_rtfree_extent(
            mp->m_sb.sb_rextents) {
                if (!(mp->m_rbmip->i_diflags & XFS_DIFLAG_NEWRTBM))
                        mp->m_rbmip->i_diflags |= XFS_DIFLAG_NEWRTBM;
-               *(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
+
+               atime = inode_get_atime(VFS_I(mp->m_rbmip));
+               atime.tv_sec = 0;
+               inode_set_atime_to_ts(VFS_I(mp->m_rbmip), atime);
                xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
        }
        error = 0;