diff options
author | Dave Jiang <dave.jiang@intel.com> | 2018-05-30 22:03:46 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-31 17:58:34 +0200 |
commit | 80660f20252d6f76c9f203874ad7c7a4a8508cf8 (patch) | |
tree | 6b34e3aff86d4455a595f37d0b2d5edc693a8bb4 /fs/ext4 | |
parent | fs: allow per-device dax status checking for filesystems (diff) | |
download | linux-80660f20252d6f76c9f203874ad7c7a4a8508cf8.tar.xz linux-80660f20252d6f76c9f203874ad7c7a4a8508cf8.zip |
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/ext4')
-rw-r--r-- | fs/ext4/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 089170e99895..2e1622907f4a 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3732,8 +3732,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) " that may contain inline data"); sbi->s_mount_opt &= ~EXT4_MOUNT_DAX; } - err = bdev_dax_supported(sb->s_bdev, blocksize); - if (err) { + if (!bdev_dax_supported(sb->s_bdev, blocksize)) { ext4_msg(sb, KERN_ERR, "DAX unsupported by block device. Turning off DAX."); sbi->s_mount_opt &= ~EXT4_MOUNT_DAX; |