xfs: require both realtime inodes to mount
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 12 Dec 2018 23:18:52 +0000 (15:18 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 13 Dec 2018 20:03:45 +0000 (12:03 -0800)
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>
fs/xfs/xfs_rtalloc.c

index aefd63d463970765797fa4f9c4202ca705b2004c..afe4d29f7ab4cfa386acad735ac2d05d744d4b3e 100644 (file)
@@ -1206,13 +1206,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);