• Varun Prakash's avatar
    iscsi-target: Return error if unable to add network portal · 83337e54
    Varun Prakash authored
    If iscsit_tpg_add_network_portal() fails then
    return error code instead of 0 to user space.
    
    If iscsi-target returns 0 then user space keeps
    on retrying same command infinitely, targetcli or
    echo hangs till command completes with non zero
    return value. In some cases it is possible that
    add network portal command never completes with
    success even after retrying multiple times,
    for example - cxgbit_setup_np() always returns
    -EINVAL if portal IP does not belong to Chelsio
    adapter interface.
    Signed-off-by: default avatarVarun Prakash <varun@chelsio.com>
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    [ bvanassche: Added "Fixes:" and "Cc: stable" tags ]
    Fixes: commit d4b3fa4b ("iscsi-target: Make iscsi_tpg_np driver show/store use generic code")
    Cc: <stable@vger.kernel.org>
    83337e54
iscsi_target_configfs.c 46.1 KB