Skip to content

Commit adcb0ca

Browse files
Christoph Hellwigdjwong
authored andcommitted
xfs: fix the dax supported check in xfs_ioctl_setattr_dax_invalidate
Setting the DAX flag on the directory of a file system that is not on a DAX capable device makes as little sense as setting it on a regular file on the same file system. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 40144e4 commit adcb0ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/xfs/xfs_ioctl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,8 +1309,7 @@ xfs_ioctl_setattr_dax_invalidate(
13091309
if (fa->fsx_xflags & FS_XFLAG_DAX) {
13101310
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
13111311
return -EINVAL;
1312-
if (S_ISREG(inode->i_mode) &&
1313-
!bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
1312+
if (!bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
13141313
sb->s_blocksize))
13151314
return -EINVAL;
13161315
}

0 commit comments

Comments
 (0)