Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3876184pxb; Tue, 17 Nov 2020 06:01:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdMIRhhtQX+R8beFY1bIdhqYrQXryEjVYcPi3d9CA5/QdoQKlKelk9ETamKqkpEZ/gSLJL X-Received: by 2002:aa7:d607:: with SMTP id c7mr20462813edr.70.1605621677646; Tue, 17 Nov 2020 06:01:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621677; cv=none; d=google.com; s=arc-20160816; b=OxosDq/u3Lea0QA99uaZHFtTqFIbC4Jko6LsBJ/vC/YFHemqZybG855oaZqeGSyGUs L/X0kJoHxjxm8PyDZOFUvds/ADow8nfb8hr90OJJkEu51kXzvDge3lwn+gMqEBc1VxSO 4lwTLy0gzs2siHHr/GJJ1hxA8imWir96x60pP7ZwR28mtNNmjJZDP38wR4i3ECGuZjPN km03k0Z5EhyEoAqX80/qltqVm7HsLMpVrQQbqPNO9DtwMhljUsGViiVbRShz/16xPmv3 f4ptTBfLZahPCjx0mZQ8PiQ+U9gCKfWD3lA7scUC69raNaaqJnFVdwDGOZuMBtLp7ei2 mWig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gKq+U1b1fWHM/Dx5N9ar1PtQkNjWTF8hbEZVenteU4k=; b=AmMhhI64nWfEBsUo6V26K1KI4x2PqbNJjOBcH3jYXzvR5YrOaK10/0U98z18QRJ/r0 LENcmNxJSxkI1YuwEOiPeOSk5gBWQXGeyJE48aIYsXxO+3/llM/PbLg9abMOu/wowyod PQRGeIwn0t8aX+UDV5F28uStkm06HoRug5fe3omBbEbI4SvRxFrxJP9kwNPZGb7Tl2yZ 5x7Lrpm1LzGBd8uZFySwcAvEeLblqk/yjc3kjyxAiWboVGq95Mf+Mzys9auxPTlwwVFs jl4vU8vo+snYUTE8/IDEiqFFpcG1quCnuQH+VTHIV3nWbdkW6o2ozX2G0ZfeqraW6Mxa 9d2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f2XSJsoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si1342713eja.406.2020.11.17.06.00.51; Tue, 17 Nov 2020 06:01:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f2XSJsoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730693AbgKQNSe (ORCPT + 99 others); Tue, 17 Nov 2020 08:18:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:50554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730107AbgKQNSG (ORCPT ); Tue, 17 Nov 2020 08:18:06 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 B5523241A5; Tue, 17 Nov 2020 13:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619086; bh=++HxS3+p8gG6RTXrNM7OCmaJlpeTrw2wJbrK08BS/PM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f2XSJsoNDmtFHWeh+0ZmMCzd//XG78onDMeb8YONNspZg3DK/OdPnQ+sMwFLgdNNr MAUWPK0RC1ickNM+G72TUuoCqL85uih3v8h/YvDyE2c4lvi0DnWJWJwIwet6e9d4/X eRChoXvZX6ijg5uf1niVkQ02HSCvAeQoYYebG5MI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Darrick J. Wong" , Christoph Hellwig , Sasha Levin Subject: [PATCH 4.19 024/101] xfs: fix scrub flagging rtinherit even if there is no rt device Date: Tue, 17 Nov 2020 14:04:51 +0100 Message-Id: <20201117122114.266213618@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Darrick J. Wong [ Upstream commit c1f6b1ac00756a7108e5fcb849a2f8230c0b62a5 ] The kernel has always allowed directories to have the rtinherit flag set, even if there is no rt device, so this check is wrong. Fixes: 80e4e1268802 ("xfs: scrub inodes") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Sasha Levin --- fs/xfs/scrub/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c index e386c9b0b4ab7..8d45d60832db9 100644 --- a/fs/xfs/scrub/inode.c +++ b/fs/xfs/scrub/inode.c @@ -131,8 +131,7 @@ xchk_inode_flags( goto bad; /* rt flags require rt device */ - if ((flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_RTINHERIT)) && - !mp->m_rtdev_targp) + if ((flags & XFS_DIFLAG_REALTIME) && !mp->m_rtdev_targp) goto bad; /* new rt bitmap flag only valid for rbmino */ -- 2.27.0