From: Jan Kara <jack@suse.cz>
Subject: xfs: Properly detect when DAX won't be used on any device
Patch-mainline: Never, fixed by cleanup 80660f20252d
References: bsc#1115976
XFS mount code failed to properly detect that DAX won't be used for any device
because return value for RT device was initialized to 'success'. Initialize
it to failure so that subsequent code does not think DAX will be used for RT
device if the filesystem has no RT device.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/xfs/xfs_super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1658,7 +1658,7 @@ xfs_fs_fill_super(
sb->s_flags |= MS_I_VERSION;
if (mp->m_flags & XFS_MOUNT_DAX) {
- int error2 = 0;
+ int error2 = -EINVAL;
error = bdev_dax_supported(mp->m_ddev_targp->bt_bdev,