|
@@ -1088,6 +1088,7 @@ xfs_ioctl_setattr_dax_invalidate(
|
|
int *join_flags)
|
|
int *join_flags)
|
|
{
|
|
{
|
|
struct inode *inode = VFS_I(ip);
|
|
struct inode *inode = VFS_I(ip);
|
|
|
|
+ struct super_block *sb = inode->i_sb;
|
|
int error;
|
|
int error;
|
|
|
|
|
|
*join_flags = 0;
|
|
*join_flags = 0;
|
|
@@ -1100,7 +1101,7 @@ xfs_ioctl_setattr_dax_invalidate(
|
|
if (fa->fsx_xflags & FS_XFLAG_DAX) {
|
|
if (fa->fsx_xflags & FS_XFLAG_DAX) {
|
|
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
|
|
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
- if (ip->i_mount->m_sb.sb_blocksize != PAGE_SIZE)
|
|
|
|
|
|
+ if (bdev_dax_supported(sb, sb->s_blocksize) < 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|