mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: Ross Zwisler <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
This commit is contained in:
parent
ba23cba9b3
commit
80660f2025
6 changed files with 22 additions and 24 deletions
|
|
@ -961,8 +961,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
|||
blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
|
||||
|
||||
if (sbi->s_mount_opt & EXT2_MOUNT_DAX) {
|
||||
err = bdev_dax_supported(sb->s_bdev, blocksize);
|
||||
if (err) {
|
||||
if (!bdev_dax_supported(sb->s_bdev, blocksize)) {
|
||||
ext2_msg(sb, KERN_ERR,
|
||||
"DAX unsupported by block device. Turning off DAX.");
|
||||
sbi->s_mount_opt &= ~EXT2_MOUNT_DAX;
|
||||
|
|
|
|||
Loading…
Reference in a new issue