aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 18:18:52 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2018-12-13 15:03:45 -0500
commit64bafd2f1e484e27071e7584642005d56516cb77 (patch)
treed4b349d3899b5ed2e7fbf7480a70db9b21079218 /fs/xfs/xfs_rtalloc.c
parent355e3532132b487ebf6a4900fad8f3525fa3e137 (diff)
xfs: require both realtime inodes to mount
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>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-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 aefd63d46397..afe4d29f7ab4 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1206,13 +1206,11 @@ xfs_rtmount_inodes(
1206 xfs_sb_t *sbp; 1206 xfs_sb_t *sbp;
1207 1207
1208 sbp = &mp->m_sb; 1208 sbp = &mp->m_sb;
1209 if (sbp->sb_rbmino == NULLFSINO)
1210 return 0;
1211 error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip); 1209 error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip);
1212 if (error) 1210 if (error)
1213 return error; 1211 return error;
1214 ASSERT(mp->m_rbmip != NULL); 1212 ASSERT(mp->m_rbmip != NULL);
1215 ASSERT(sbp->sb_rsumino != NULLFSINO); 1213
1216 error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip); 1214 error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip);
1217 if (error) { 1215 if (error) {
1218 xfs_irele(mp->m_rbmip); 1216 xfs_irele(mp->m_rbmip);