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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 722D8C6FA83 for ; Mon, 26 Sep 2022 10:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231396AbiIZKul (ORCPT ); Mon, 26 Sep 2022 06:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236624AbiIZKss (ORCPT ); Mon, 26 Sep 2022 06:48:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D8E57278; Mon, 26 Sep 2022 03:26:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B847FB80915; Mon, 26 Sep 2022 10:26:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BA1AC433D6; Mon, 26 Sep 2022 10:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187976; bh=/TEysB9aXAw6YnUMtjKbjnb69VGEdNqHrGLDObPJF5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hS3e95NbOTHLUINvhaeGilYA9V6u+3Ng3xqdrx21+Ei8lqCtpvT0ZuvTmfPLL/TDi /2ZvLAaFTkr/cM7jJg82JjWC67lklXIgfvsdybHlPgh95/1afz/fYLfx88ioYeH6yS AhjD4A1BSZ56zbdtEtGFdNohyVZ5eoiOmUqGXmSI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Darrick J. Wong" , Christoph Hellwig , "Darrick J. Wong" , Chandan Babu R Subject: [PATCH 5.4 106/120] xfs: add missing assert in xfs_fsmap_owner_from_rmap Date: Mon, 26 Sep 2022 12:12:19 +0200 Message-Id: <20220926100754.842710680@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100750.519221159@linuxfoundation.org> References: <20220926100750.519221159@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: "Darrick J. Wong" commit 110f09cb705af8c53f2a457baf771d2935ed62d4 upstream. The fsmap handler shouldn't fail silently if the rmap code ever feeds it a special owner number that isn't known to the fsmap handler. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Acked-by: Darrick J. Wong Signed-off-by: Chandan Babu R Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_fsmap.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -146,6 +146,7 @@ xfs_fsmap_owner_from_rmap( dest->fmr_owner = XFS_FMR_OWN_FREE; break; default: + ASSERT(0); return -EFSCORRUPTED; } return 0;