xfs: disable per-inode DAX flag
authorChristoph Hellwig <hch@lst.de>
Sun, 17 Sep 2017 21:07:08 +0000 (14:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Sep 2017 06:20:02 +0000 (08:20 +0200)
commit 742d84290739ae908f1b61b7d17ea382c8c0073a upstream.

Currently flag switching can be used to easily crash the kernel.  Disable
the per-inode DAX flag until that is sorted out.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_ioctl.c

index 73cfc71..be54216 100644 (file)
@@ -1005,11 +1005,12 @@ xfs_diflags_to_linux(
                inode->i_flags |= S_NOATIME;
        else
                inode->i_flags &= ~S_NOATIME;
+#if 0  /* disabled until the flag switching races are sorted out */
        if (xflags & FS_XFLAG_DAX)
                inode->i_flags |= S_DAX;
        else
                inode->i_flags &= ~S_DAX;
-
+#endif
 }
 
 static int