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 51938C432C3 for ; Fri, 22 Nov 2019 06:12:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DD8F2068E for ; Fri, 22 Nov 2019 06:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574403172; bh=t1EdpJQW4VryGn/Djhq2Iot/ZpiqrgpNUkF5kIG1R94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DFBXtJNmuMvKY6kCS0m5aXMw/N+vljPac/CleluNrcnVh0rzzG3dag40OsAk5+0He AVimKxJEG97P0ESCMFUj+XQBQ/C4wUUCqw7+P+CRrQEqVD4QEZ+eJGtgABVpUJIWoj ojxK+/RgWKYJOueESioVLMM7u4uxEWKUshGEbbmw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbfKVF4I (ORCPT ); Fri, 22 Nov 2019 00:56:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:33854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729012AbfKVF4I (ORCPT ); Fri, 22 Nov 2019 00:56:08 -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 C5D1B20659; Fri, 22 Nov 2019 05:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574402167; bh=t1EdpJQW4VryGn/Djhq2Iot/ZpiqrgpNUkF5kIG1R94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=icRHzxr3xXtyFAEKiuuwfa2cSzlX6zBMTCr1c2wjbibnmWdI24hI9RUNMS+10s/wU Sf1PL7TITxcZU5O1SVcvTIMHrX6oQKZozY7240P1haAOHl31avuWOBvLzwQ3BRXRpY hmGjeJI+EPrEwpkHoPqJPqAHMhrsBGb4a2OVmBxI= 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.14 020/127] xfs: require both realtime inodes to mount Date: Fri, 22 Nov 2019 00:53:58 -0500 Message-Id: <20191122055544.3299-19-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122055544.3299-1-sashal@kernel.org> References: <20191122055544.3299-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@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 488719d43ca82..cdcb7235e41ae 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1214,13 +1214,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