[PATCH 2/4] libxfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 libxfs/util.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/libxfs/util.c b/libxfs/util.c
index 78519872e8e8..f1b4759728ec 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;




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux