xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
                xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
                /*
-                * Update the bitmap inode's size.
+                * Update the bitmap inode's size ondisk and incore.  We need
+                * to update the incore size so that inode inactivation won't
+                * punch what it thinks are "posteof" blocks.
                 */
                mp->m_rbmip->i_d.di_size =
                        nsbp->sb_rbmblocks * nsbp->sb_blocksize;
+               i_size_write(VFS_I(mp->m_rbmip), mp->m_rbmip->i_d.di_size);
                xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
                /*
                 * Get the summary inode into the transaction.
                xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL);
                xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
                /*
-                * Update the summary inode's size.
+                * Update the summary inode's size.  We need to update the
+                * incore size so that inode inactivation won't punch what it
+                * thinks are "posteof" blocks.
                 */
                mp->m_rsumip->i_d.di_size = nmp->m_rsumsize;
+               i_size_write(VFS_I(mp->m_rsumip), mp->m_rsumip->i_d.di_size);
                xfs_trans_log_inode(tp, mp->m_rsumip, XFS_ILOG_CORE);
                /*
                 * Copy summary data from old to new sizes.