mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-18 19:12:56 +00:00
scsi: core: Don't memset() the entire scsi_cmnd in scsi_init_command()
[ Upstream commit71bada345b] Replace the big fat memset that requires saving and restoring various fields with just initializing those fields that need initialization. All the clearing to 0 is moved to scsi_prepare_cmd() as scsi_ioctl_reset() alreadly uses kzalloc() to allocate a pre-zeroed command. This is still conservative and can probably be optimized further. Link: https://lore.kernel.org/r/20220224175552.988286-3-hch@lst.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.garry@huawei.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Stable-dep-of:dce5c4afd0("scsi: core: Clear driver private data when retrying request") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4b49d939b5
commit
668ef6c54c
1 changed files with 28 additions and 32 deletions
Loading…
Add table
Add a link
Reference in a new issue