summary refs log tree commit diff
path: root/fs/xfs/xfs_ioctl.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2018-05-30 13:03:46 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-05-31 08:58:34 -0700
commit80660f20252d6f76c9f203874ad7c7a4a8508cf8 (patch)
tree6b34e3aff86d4455a595f37d0b2d5edc693a8bb4 /fs/xfs/xfs_ioctl.c
parentba23cba9b3bdc967aabdc6ff1e3e9b11ce05bb4f (diff)
downloadlinux-80660f20252d6f76c9f203874ad7c7a4a8508cf8.tar.gz
dax: change bdev_dax_supported() to support boolean returns
The function return values are confusing with the way the function is
named. We expect a true or false return value but it actually returns
0/-errno.  This makes the code very confusing. Changing the return values
to return a bool where if DAX is supported then return true and no DAX
support returns false.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r--fs/xfs/xfs_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index c9a5b75a73a8..5dd9e22b4a4c 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1103,8 +1103,8 @@ xfs_ioctl_setattr_dax_invalidate(
 	if (fa->fsx_xflags & FS_XFLAG_DAX) {
 		if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
 			return -EINVAL;
-		if (bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
-				sb->s_blocksize) < 0)
+		if (!bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
+				sb->s_blocksize))
 			return -EINVAL;
 	}