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

target: Do not return 0 from aptpl and alua configfs store functions

Here are some more instances where we are returning 0 from a configfs
store function, the unintended result of which is likely infinite retries
from userspace.

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
9105bfc0 bc1a7d6a

+3 -3
+3 -3
drivers/target/target_core_configfs.c
··· 1590 1590 u8 type = 0; 1591 1591 1592 1592 if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH) 1593 - return 0; 1593 + return count; 1594 1594 if (dev->dev_reservation_flags & DRF_SPC2_RESERVATIONS) 1595 - return 0; 1595 + return count; 1596 1596 1597 1597 if (dev->export_count) { 1598 1598 pr_debug("Unable to process APTPL metadata while" ··· 1985 1985 1986 1986 lu_gp_mem = dev->dev_alua_lu_gp_mem; 1987 1987 if (!lu_gp_mem) 1988 - return 0; 1988 + return count; 1989 1989 1990 1990 if (count > LU_GROUP_NAME_BUF) { 1991 1991 pr_err("ALUA LU Group Alias too large!\n");