summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_iops.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2016-03-07 09:34:31 +1100
committerDave Chinner <david@fromorbit.com>2016-03-07 09:34:31 +1100
commit85a9f38d382bf06e995f2b1bf114596bac08d14d (patch)
treec6d4dd82d6ebe436203ef73e47a093b59bc3daad /fs/xfs/xfs_iops.c
parent3d93ec03648dfbe0f6772b906c8d27a4feaee75f (diff)
parent64485437357dfdc9752495b3f496adfc5c816c6f (diff)
Merge branch 'xfs-dax-fixes-4.6' into for-next
Diffstat (limited to 'fs/xfs/xfs_iops.c')
-rw-r--r--fs/xfs/xfs_iops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 0d38b1d2c420..fb7dc61f4a29 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -1185,8 +1185,10 @@ xfs_diflags_to_iflags(
inode->i_flags |= S_SYNC;
if (flags & XFS_DIFLAG_NOATIME)
inode->i_flags |= S_NOATIME;
- if (ip->i_mount->m_flags & XFS_MOUNT_DAX ||
- ip->i_d.di_flags2 & XFS_DIFLAG2_DAX)
+ if (S_ISREG(inode->i_mode) &&
+ ip->i_mount->m_sb.sb_blocksize == PAGE_SIZE &&
+ (ip->i_mount->m_flags & XFS_MOUNT_DAX ||
+ ip->i_d.di_flags2 & XFS_DIFLAG2_DAX))
inode->i_flags |= S_DAX;
}