Skip to content

Commit 63ca022

Browse files
hawkxiangmartinkpetersen
authored andcommitted
scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request
The ISCSI_UEVENT_GET_HOST_STATS request is already handled in iscsi_get_host_stats(). This fix ensures that redundant responses are skipped in iscsi_if_rx(). - On success: send reply and stats from iscsi_get_host_stats() within if_recv_msg(). - On error: fall through. Signed-off-by: Xiang Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 8604f63 commit 63ca022

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4104,7 +4104,7 @@ iscsi_if_rx(struct sk_buff *skb)
41044104
}
41054105
do {
41064106
/*
4107-
* special case for GET_STATS:
4107+
* special case for GET_STATS, GET_CHAP and GET_HOST_STATS:
41084108
* on success - sending reply and stats from
41094109
* inside of if_recv_msg(),
41104110
* on error - fall through.
@@ -4113,6 +4113,8 @@ iscsi_if_rx(struct sk_buff *skb)
41134113
break;
41144114
if (ev->type == ISCSI_UEVENT_GET_CHAP && !err)
41154115
break;
4116+
if (ev->type == ISCSI_UEVENT_GET_HOST_STATS && !err)
4117+
break;
41164118
err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
41174119
ev, sizeof(*ev));
41184120
if (err == -EAGAIN && --retries < 0) {

0 commit comments

Comments
 (0)