scsi: core: Use a structure member to track the SCSI command submitter
stable inclusion from stable-v5.10.206 commit f2d30198c0530b8da155697d8723e19ac72c15fe category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8ZD3X CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.206&id=f2d30198c0530b8da155697d8723e19ac72c15fe ------------------------- [ Upstream commit bf23e619 ] Conditional statements are faster than indirect calls. Use a structure member to track the SCSI command submitter such that later patches can call scsi_done(scmd) instead of scmd->scsi_done(scmd). The asymmetric behavior that scsi_send_eh_cmnd() sets the submission context to the SCSI error handler and that it does not restore the submission context to the SCSI core is retained. Link: https://lore.kernel.org/r/20211007202923.2174984-2-bvanassche@acm.org Cc: Hannes Reinecke <hare@suse.com> Cc: Ming Lei <ming.lei@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Reviewed-by:Benjamin Block <bblock@linux.ibm.com> Reviewed-by:
Bean Huo <beanhuo@micron.com> Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> Stable-dep-of: 066c5b46b6ea ("scsi: core: Always send batch on reset or error handling command") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Li Lingfeng <lilingfeng3@huawei.com> Signed-off-by:
Li Lingfeng <lilingfeng3@huawei.com>
Loading
Please sign in to comment