Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4597652pja; Thu, 21 Nov 2019 22:33:47 -0800 (PST) X-Google-Smtp-Source: APXvYqzVJOcqr/pLDj3o6ODLr7Jofg5CDJXW8+uFbtWjU15k7oNin+hcavUd8NO9F9wIIQOQRITP X-Received: by 2002:a17:906:2241:: with SMTP id 1mr19911455ejr.16.1574404427830; Thu, 21 Nov 2019 22:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404427; cv=none; d=google.com; s=arc-20160816; b=1HYzfHgAu+ZVzchdULwEFf9duSGmmKoM5hv3+j/2e8yDm1H1Hkkkdnj7Kaz5+FoVJ0 cwKOlhVEEn6iPH1GX7jLN0pkfJ8lK35+GoQ7CiPXlOkXEyKe5RY5XZG93obbDuiWnaY9 HytyNv8r2It3oZDkJXBcmGl/8+PorhFHtxZIv76/4FTHu/R64jg6dEYvdiuNqhjwPICq ZH4qotQV4BfPNgFn7e4dDgaGbIc0m06Llzi6UZYZXbm1Sezwgc4/afAhSqrUGSIVuwpz +qPqgFXLYhh+8eiLc0JHk4pg4RCjwsMGMSrCRx/XfXb0GctTb2pr5xMo0mFlL732idW4 cvfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jNVM/NwJp6FbTkC9MEQTADGVVL5Y3fgxqU62q5T17uY=; b=GNBoSDf1AedfYW9mqZIeTkB1CejmGDWU7KhXyPcVgMQp1phCuX25JzUAfgSndagJtA ivS7Jo13rQ/lt05bCuvNnEBlZg5eKYdba6PvQMkuVREUPAr9daL1xglbMJuIZvbh48uZ NYFG8f2IcX0NIRd1w9TYRrvvFPeL+QNmP7vGOyC4IU7whK8BH2jEp4EVqXklGT+zrCLl KJgqnzibRj/+GCnI3U5MNJEL24ge/cy/4CqbnF7csyUl4tt5OQNoo6dcDZSGHBzySfSg yFnzFruVfObSD3GQBq7JFrnqanmNX4PyWi09p2HOQb6dzcLfvB94c+Gb2UPwYpkQOt1n j8wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wui7xc7b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si2435479eja.438.2019.11.21.22.33.24; Thu, 21 Nov 2019 22:33:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wui7xc7b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728749AbfKVG2q (ORCPT + 99 others); Fri, 22 Nov 2019 01:28:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:54510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727508AbfKVFuH (ORCPT ); Fri, 22 Nov 2019 00:50:07 -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 CAD882068F; Fri, 22 Nov 2019 05:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401806; bh=O8wyPceWayF533GAkTF/pAHkQtQKQAuf8TKGcWkyJoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wui7xc7b8H4Xmf2RtO2/lOcI19UqcrNRKrKQOgpJqT5hcVTrlnDhcF4haH7X28F7O y3zs63khc/TXnDmqB+bsEIjrmBZ9wbMv5ccMX83TmbNTJJiALJ6l/4MLOLs0Jv7CBZ J54YXy6WOXJc9dhAlswQJn9b/8Z/I1LY0daO5C2M= 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.19 051/219] xfs: require both realtime inodes to mount Date: Fri, 22 Nov 2019 00:46:23 -0500 Message-Id: <20191122054911.1750-44-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-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 926ed314ffba1..484eb0adcefb2 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1198,13 +1198,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); -- 2.20.1