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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 DEE13C2BD09 for ; Wed, 4 Dec 2019 18:28:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA6C6206DF for ; Wed, 4 Dec 2019 18:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575484089; bh=Qawu1cW5CeHOX3fCanhGZXuPj8DJp9inTsgrwyuJqyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=if3CazR268Iwx2Io1QoTf1k62E8D9lc/oqr1EPOzy99jHFcyQlCH/oh0bMpnzqVwD deMtOYORUEzF6HzcpswLfuRFBKctMRE69RMR94NqqvMXTq48zUYjs+o9FpVHqyCc7i INdIG9oAdxs/oCPm1a+/Bfq+q2tpXdWseS2WM/y4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728521AbfLDR6A (ORCPT ); Wed, 4 Dec 2019 12:58:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:59586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728467AbfLDR54 (ORCPT ); Wed, 4 Dec 2019 12:57:56 -0500 Received: from localhost (unknown [217.68.49.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3869E2173B; Wed, 4 Dec 2019 17:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575482275; bh=Qawu1cW5CeHOX3fCanhGZXuPj8DJp9inTsgrwyuJqyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mRePMaKe97TosOQ1u/Pjzj9feuCK3KpKFbRUKR60NKkm0DbIEVo6gSh5H0na8ImCO YeHhjtfhWK+2L+f7xrfNPUG4oCUXbbOuaos5C+pFA0tSZZ6ZlCHfUXC0sxHTzGcJFq FYnFoxTfVLS61ErFNe/COxep+PlbOVQUysZ3Fcl0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Darrick J. Wong" , Bill ODonnell , Sasha Levin Subject: [PATCH 4.4 22/92] xfs: require both realtime inodes to mount Date: Wed, 4 Dec 2019 18:49:22 +0100 Message-Id: <20191204174331.256766422@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204174327.215426506@linuxfoundation.org> References: <20191204174327.215426506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 ab1bac6a3a1c0..919b6544b61a3 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1225,13 +1225,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