From: Darrick J. Wong Date: Wed, 30 Sep 2020 14:59:15 +0000 (-0400) Subject: libxfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev X-Git-Tag: xfsprogs-5.9-fixes2_2020-10-10~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c03cb237fdea426448331f7a9cede89cd548180;p=thirdparty%2Fxfsprogs-dev.git libxfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev 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 Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/libxfs/util.c b/libxfs/util.c index 3967ef1bd..c78074a01 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -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;