Blob Blame History Raw
From: Jan Kara <jack@suse.cz>
Subject: dm, dax: Fix detection of DAX support
References: bsc#1139782
Patch-mainline: Never, upstream has 80660f2025 "dax: change bdev_dax_supported()
		to support boolean returns"

We do not have commit 80660f2025 "dax: change bdev_dax_supported() to support
boolean returns" in SLE15 due to kABI. Thus return values of
device_supports_dax() are effectively inverted. Fixup the check in
dm_table_supports_dax() to count with this.

Reported-by: Lidong Zhong <lidong.zhong@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>

---
 drivers/md/dm-table.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -899,7 +899,7 @@ static bool dm_table_supports_dax(struct
 			return false;
 
 		if (!ti->type->iterate_devices ||
-		    !ti->type->iterate_devices(ti, device_supports_dax, NULL))
+		    ti->type->iterate_devices(ti, device_supports_dax, NULL) < 0)
 			return false;
 	}