Skip to contentSkip to conversation

xfs: fix scrub flagging rtinherit even if there is no rt device

PATCH In review Darrick J. Wong 2 participants 2 messages Nov 3, 2020 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: fix scrub flagging rtinherit even if there is no rt device

From: Darrick J. Wong <[email protected]>

The kernel has always allowed directories to have the rtinherit flag set, even if there is no rt device, so this check is wrong.

---
 fs/xfs/scrub/inode.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/xfs/scrub/inode.c +1 -2
index 3aa85b64de36..bb25ff1b770d 100644
@@ -121,8 +121,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 */