Commit 9b17621
scsi: iscsi: Fix incorrect error path labels for flashnode operations
Correct the error handling goto labels used when host lookup fails in
various flashnode-related event handlers:
- iscsi_new_flashnode()
- iscsi_del_flashnode()
- iscsi_login_flashnode()
- iscsi_logout_flashnode()
- iscsi_logout_flashnode_sid()
scsi_host_put() is not required when shost is NULL, so jumping to the
correct label avoids unnecessary operations. These functions previously
jumped to the wrong goto label (put_host), which did not match the
intended cleanup logic.
Use the correct exit labels (exit_new_fnode, exit_del_fnode, etc.) to
ensure proper error handling. Also remove the unused put_host label
under iscsi_new_flashnode() as it is no longer needed.
No functional changes beyond accurate error path correction.
Fixes: c6a4bb2 ("[SCSI] scsi_transport_iscsi: Add flash node mgmt support")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://lore.kernel.org/r/20250530193012.3312911-1-alok.a.tiwari@oracle.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent ad0f548 commit 9b17621
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3499 | 3499 | | |
3500 | 3500 | | |
3501 | 3501 | | |
3502 | | - | |
| 3502 | + | |
3503 | 3503 | | |
3504 | 3504 | | |
3505 | 3505 | | |
| |||
3509 | 3509 | | |
3510 | 3510 | | |
3511 | 3511 | | |
3512 | | - | |
3513 | 3512 | | |
3514 | 3513 | | |
3515 | 3514 | | |
| |||
3534 | 3533 | | |
3535 | 3534 | | |
3536 | 3535 | | |
3537 | | - | |
| 3536 | + | |
3538 | 3537 | | |
3539 | 3538 | | |
3540 | 3539 | | |
| |||
3576 | 3575 | | |
3577 | 3576 | | |
3578 | 3577 | | |
3579 | | - | |
| 3578 | + | |
3580 | 3579 | | |
3581 | 3580 | | |
3582 | 3581 | | |
| |||
3628 | 3627 | | |
3629 | 3628 | | |
3630 | 3629 | | |
3631 | | - | |
| 3630 | + | |
3632 | 3631 | | |
3633 | 3632 | | |
3634 | 3633 | | |
| |||
3678 | 3677 | | |
3679 | 3678 | | |
3680 | 3679 | | |
3681 | | - | |
| 3680 | + | |
3682 | 3681 | | |
3683 | 3682 | | |
3684 | 3683 | | |
| |||
0 commit comments