1 From f14146345d00e69e3be2060e4c6bce836ea15875 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Mon, 2 Nov 2020 17:14:07 -0800
4 Subject: xfs: fix scrub flagging rtinherit even if there is no rt device
6 From: Darrick J. Wong <darrick.wong@oracle.com>
8 [ Upstream commit c1f6b1ac00756a7108e5fcb849a2f8230c0b62a5 ]
10 The kernel has always allowed directories to have the rtinherit flag
11 set, even if there is no rt device, so this check is wrong.
13 Fixes: 80e4e1268802 ("xfs: scrub inodes")
14 Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
15 Reviewed-by: Christoph Hellwig <hch@lst.de>
16 Signed-off-by: Sasha Levin <sashal@kernel.org>
18 fs/xfs/scrub/inode.c | 3 +--
19 1 file changed, 1 insertion(+), 2 deletions(-)
21 diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c
22 index e386c9b0b4ab7..8d45d60832db9 100644
23 --- a/fs/xfs/scrub/inode.c
24 +++ b/fs/xfs/scrub/inode.c
25 @@ -131,8 +131,7 @@ xchk_inode_flags(
28 /* rt flags require rt device */
29 - if ((flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_RTINHERIT)) &&
31 + if ((flags & XFS_DIFLAG_REALTIME) && !mp->m_rtdev_targp)
34 /* new rt bitmap flag only valid for rbmino */