xfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 13 Sep 2020 17:16:41 +0000 (10:16 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 16 Sep 2020 03:52:43 +0000 (20:52 -0700)
commitd4f2c14cc9793be78f4655b6e136484d7fdbdd72
tree6f69850494ecc44ff27168e187f0509d24644301
parent8a569d717ed01df77830fdde173dbb832d6bfba5
xfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev

While running generic/042 with -drtinherit=1 set in MKFS_OPTIONS, I
observed that the kernel will gladly set the realtime flag on any file
created on the loopback filesystem even though that filesystem doesn't
actually have a realtime device attached.  This leads to verifier
failures and doesn't make any sense, so be smarter about this.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_inode.c