Merge tag 'mac80211-for-davem-2016-07-06' of git://git.kernel.org/pub/scm/linux/kerne...
[cascardo/linux.git] / fs / xfs / xfs_super.c
index 416421d..11ea5d5 100644 (file)
@@ -1555,14 +1555,12 @@ xfs_fs_fill_super(
 
        if (mp->m_flags & XFS_MOUNT_DAX) {
                xfs_warn(mp,
-       "DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
-               if (sb->s_blocksize != PAGE_SIZE) {
-                       xfs_alert(mp,
-               "Filesystem block size invalid for DAX Turning DAX off.");
-                       mp->m_flags &= ~XFS_MOUNT_DAX;
-               } else if (!sb->s_bdev->bd_disk->fops->direct_access) {
+               "DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
+
+               error = bdev_dax_supported(sb, sb->s_blocksize);
+               if (error) {
                        xfs_alert(mp,
-               "Block device does not support DAX Turning DAX off.");
+                       "DAX unsupported by block device. Turning off DAX.");
                        mp->m_flags &= ~XFS_MOUNT_DAX;
                }
        }