]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 Sep 2020 14:59:15 +0000 (10:59 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 30 Sep 2020 14:59:15 +0000 (10:59 -0400)
When creating a file inside a directory that has RTINHERIT set, only
propagate the REALTIME flag to the file if the filesystem actually has a
realtime volume configured.  Otherwise, we end up writing inodes that
trip the verifiers.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/util.c

index 3967ef1bd816c2393b5dd778d18638571be47907..c78074a01dab71229e2d8c177a3cf732eb43ea13 100644 (file)
@@ -224,9 +224,9 @@ xfs_inode_propagate_flags(
                        ip->i_d.di_extsize = pip->i_d.di_extsize;
                }
        } else {
-               if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) {
+               if ((pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) &&
+                   xfs_sb_version_hasrealtime(&ip->i_mount->m_sb))
                        di_flags |= XFS_DIFLAG_REALTIME;
-               }
                if (pip->i_d.di_flags & XFS_DIFLAG_EXTSZINHERIT) {
                        di_flags |= XFS_DIFLAG_EXTSIZE;
                        ip->i_d.di_extsize = pip->i_d.di_extsize;