From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72451C432C0 for ; Fri, 22 Nov 2019 06:08:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36AA820707 for ; Fri, 22 Nov 2019 06:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574402907; bh=bDG4xtoh/SrBstjX3anlU4xsiDOvEQgQgmYJo+6L2m8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hrNZaBJNGeR7ALaVihrkUMHubqgrwsb27W+k3uVfIWXbPAWwwFaOlYCaSSsTzj66v /BlujC4bXU5FHqKFwE/S0NvbOkH00fg7pTAx4kcOqQMThGad0ntqA7GN29zowyB99j K2/S77bGLnggDblPuaoXYO7qT2Q2314jdp1JJ3Nc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729188AbfKVGIZ (ORCPT ); Fri, 22 Nov 2019 01:08:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:40048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729127AbfKVGBq (ORCPT ); Fri, 22 Nov 2019 01:01:46 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF0D020714; Fri, 22 Nov 2019 06:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574402505; bh=bDG4xtoh/SrBstjX3anlU4xsiDOvEQgQgmYJo+6L2m8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=irI5Tp8hdXAqCK1P3Nypah+lNyayM5cWnAHJ6klvm1nkoCr8P4o8YMoOremLkkHjf Hs1wC++2Hvbdm6jlvZCn8OZp9DFYM9RRE/QdF1Tu6aNCC4IYOPiydkyQ+HuTV5Ftm5 emLFH496OFECF01nDnzhAP2xY9NDDhHRSbnX+G7s= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Darrick J. Wong" , Bill O'Donnell , Sasha Levin , linux-xfs@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 15/91] xfs: require both realtime inodes to mount Date: Fri, 22 Nov 2019 01:00:13 -0500 Message-Id: <20191122060129.4239-14-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122060129.4239-1-sashal@kernel.org> References: <20191122060129.4239-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Darrick J. Wong" [ 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 Reviewed-by: Bill O'Donnell Signed-off-by: Sasha Levin --- fs/xfs/xfs_rtalloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 802bcc326d9fb..0d93d3c10fcc4 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1222,13 +1222,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) { IRELE(mp->m_rbmip); -- 2.20.1