Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Yanko Kaneti <yaneti@declera.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Andy Grover and committed by
Nicholas Bellinger
bc1a7d6a fd4e1393

+1 -1
+1 -1
drivers/target/target_core_configfs.c
··· 747 747 if (!dev->transport->init_prot || !dev->transport->free_prot) { 748 748 /* 0 is only allowed value for non-supporting backends */ 749 749 if (flag == 0) 750 - return 0; 750 + return count; 751 751 752 752 pr_err("DIF protection not supported by backend: %s\n", 753 753 dev->transport->name);