target: Fix inverted logic in SE_DEV_ALUA_SUPPORT_STATE_STORE
authorSebastian Herbszt <herbszt@gmx.de>
Sun, 31 Aug 2014 22:17:53 +0000 (00:17 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 17 Sep 2014 18:06:52 +0000 (11:06 -0700)
Fix inverted logic in SE_DEV_ALUA_SUPPORT_STATE_STORE for setting
the supported ALUA access states via configfs, originally introduced
in commit b0a382c5.

A value of 1 should enable the support, not disable it.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_configfs.c

index bf55c5a04cfac68983b2c565c9f9498f6aaad1ed..756def38c77af934a3e16ef3ae9219e67ceb06cc 100644 (file)
@@ -2363,7 +2363,7 @@ static ssize_t target_core_alua_tg_pt_gp_store_attr_alua_support_##_name(\
                pr_err("Invalid value '%ld', must be '0' or '1'\n", tmp); \
                return -EINVAL;                                         \
        }                                                               \
-       if (!tmp)                                                       \
+       if (tmp)                                                        \
                t->_var |= _bit;                                        \
        else                                                            \
                t->_var &= ~_bit;                                       \