summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 15:18:52 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 09:20:08 +0100
commit2f99d478ddbd8293e6fe499b5906c8c7cfa79141 (patch)
tree10e3efac91ff2764b7bd8af28166c0d70d9dc640 /fs/xfs
parentb2d84967f07658bab63e6157bd2758db5cc68c86 (diff)
downloadlinux-stable-2f99d478ddbd8293e6fe499b5906c8c7cfa79141.tar.gz
linux-stable-2f99d478ddbd8293e6fe499b5906c8c7cfa79141.tar.bz2
linux-stable-2f99d478ddbd8293e6fe499b5906c8c7cfa79141.zip
xfs: require both realtime inodes to mount
[ Upstream commit 64bafd2f1e484e27071e7584642005d56516cb77 ] Since mkfs always formats the filesystem with the realtime bitmap and summary inodes immediately after the root directory, we should expect that both of them are present and loadable, even if there isn't a realtime volume attached. There's no reason to skip this if rbmino == NULLFSINO; in fact, this causes an immediate crash if the there /is/ a realtime volume and someone writes to it. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_rtalloc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 926ed314ffba..484eb0adcefb 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1198,13 +1198,11 @@ xfs_rtmount_inodes(
xfs_sb_t *sbp;
sbp = &mp->m_sb;
- if (sbp->sb_rbmino == NULLFSINO)
- return 0;
error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip);
if (error)
return error;
ASSERT(mp->m_rbmip != NULL);
- ASSERT(sbp->sb_rsumino != NULLFSINO);
+
error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip);
if (error) {
xfs_irele(mp->m_rbmip);