提交 bc1a7d6a 编写于 作者: A Andy Grover 提交者: Nicholas Bellinger

target: Indicate success if writing 0 to pi_prot_type

See https://bugzilla.redhat.com/show_bug.cgi?id=1240687

Returning 0 from a configfs store function results in infinite retries.
Reported-by: NYanko Kaneti <yaneti@declera.com>
Signed-off-by: NAndy Grover <agrover@redhat.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 fd4e1393
...@@ -747,7 +747,7 @@ static ssize_t store_pi_prot_type(struct se_dev_attrib *da, ...@@ -747,7 +747,7 @@ static ssize_t store_pi_prot_type(struct se_dev_attrib *da,
if (!dev->transport->init_prot || !dev->transport->free_prot) { if (!dev->transport->init_prot || !dev->transport->free_prot) {
/* 0 is only allowed value for non-supporting backends */ /* 0 is only allowed value for non-supporting backends */
if (flag == 0) if (flag == 0)
return 0; return count;
pr_err("DIF protection not supported by backend: %s\n", pr_err("DIF protection not supported by backend: %s\n",
dev->transport->name); dev->transport->name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册