Discussion:
[PATCH] target_core_configfs: fix SE_DEV_ALUA_SUPPORT_STATE_STORE
Sebastian Herbszt
2014-08-31 22:17:53 UTC
Permalink
Fix inverted logic. A value of 1 should enable the support, not disable it.

Signed-off-by: Sebastian Herbszt <***@gmx.de>

diff -urp a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
--- a/drivers/target/target_core_configfs.c 2014-08-31 23:26:21.000000000 +0200
+++ b/drivers/target/target_core_configfs.c 2014-08-31 23:37:30.214209497 +0200
@@ -2363,7 +2363,7 @@ static ssize_t target_core_alua_tg_pt_gp
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; \
Nicholas A. Bellinger
2014-09-17 18:11:04 UTC
Permalink
Hi Sebastian,
Post by Sebastian Herbszt
Fix inverted logic. A value of 1 should enable the support, not disable it.
diff -urp a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
--- a/drivers/target/target_core_configfs.c 2014-08-31 23:26:21.000000000 +0200
+++ b/drivers/target/target_core_configfs.c 2014-08-31 23:37:30.214209497 +0200
@@ -2363,7 +2363,7 @@ static ssize_t target_core_alua_tg_pt_gp
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; \
--
Nice catch! Added to target-pending/master, with a CC' to stable for >=
v3.14.y.

Also, adding Hannes again as he's the original author of the patch.

Thanks!

--nab

Loading...