]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
xfs: fix scrub flagging rtinherit even if there is no rt device
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 3 Nov 2020 01:14:07 +0000 (17:14 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:06:15 +0000 (12:06 +0100)
BugLink: https://bugs.launchpad.net/bugs/1905618
[ 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 <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/xfs/scrub/inode.c

index 6d483ab29e6397e8084935f2046face4b624097e..1bea029b634a66854734ff547ad7cd637da6e1f2 100644 (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 */