diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2026-09-25 11:09:45 -0700 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-03 09:49:35 -0400 |
| commit | d2398f2e2e5d3ad3ff0542fb12009b709045dbd8 (patch) | |
| tree | 7bfb8183426fb6ad0503aeaae8741624679c7b72 /tools/lib/python | |
| parent | 931a0649b9a8da36d63b108262ba82a41cd5ded3 (diff) | |
| download | linux-next-d2398f2e2e5d3ad3ff0542fb12009b709045dbd8.tar.gz linux-next-d2398f2e2e5d3ad3ff0542fb12009b709045dbd8.zip | |
scsi: core: Micro-optimize the hot path
Every code path that inserts scmd->eh_entry into a list uses
list_add_tail() (see also scsi_abort_command() and scsi_eh_scmd_add()).
list_add_tail() overwrites the next and prev pointers. Hence, the only code
that depends on the initialization of scmd->eh_entry is the
BUG_ON(!list_empty(&scmd->eh_entry)) statement in scsi_abort_command().
Remove this statement because scsi_timeout() already prevents
scsi_abort_command() from being called twice for the same command by
setting SCMD_STATE_COMPLETE. Remove the scmd->eh_entry initialization
because the only statement that relied on this initialization has been
removed.
Cc: John Garry <john.garry@linux.dev>
Cc: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.garry@linux.dev>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/1ac0d4d0c06e55943e188d0dee9b6f2475715f21.1790359761.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
