Commit bc1a7d6a authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger
Browse files

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: default avatarYanko Kaneti <yaneti@declera.com>
Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent fd4e1393
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
		/* 0 is only allowed value for non-supporting backends */
		if (flag == 0)
			return 0;
			return count;

		pr_err("DIF protection not supported by backend: %s\n",
		       dev->transport->name);