1
0
Fork 0

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

[ Upstream commit c1f6b1ac00 ]

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: 80e4e12688 ("xfs: scrub inodes")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Darrick J. Wong 2020-11-02 17:14:07 -08:00 committed by Greg Kroah-Hartman
parent 2f6cbef327
commit 0685eb84ad
1 changed files with 1 additions and 2 deletions

View File

@ -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 */