Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: core: Move two statements

Move two statements that will be needed for pseudo SCSI devices in front
of code that won't be needed for pseudo SCSI devices. No functionality
has been changed.

Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251031204029.2883185-3-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
21008cab d604e1ec

+4 -3
+4 -3
drivers/scsi/scsi_scan.c
··· 347 347 kref_get(&sdev->host->tagset_refcnt); 348 348 sdev->request_queue = q; 349 349 350 + scsi_sysfs_device_initialize(sdev); 351 + 350 352 depth = sdev->host->cmd_per_lun ?: 1; 351 353 352 354 /* ··· 364 362 } 365 363 366 364 scsi_change_queue_depth(sdev, depth); 367 - 368 - scsi_sysfs_device_initialize(sdev); 369 365 370 366 if (shost->hostt->sdev_init) { 371 367 ret = shost->hostt->sdev_init(sdev); ··· 1068 1068 1069 1069 transport_configure_device(&sdev->sdev_gendev); 1070 1070 1071 + sdev->sdev_bflags = *bflags; 1072 + 1071 1073 /* 1072 1074 * No need to freeze the queue as it isn't reachable to anyone else yet. 1073 1075 */ ··· 1115 1113 1116 1114 sdev->max_queue_depth = sdev->queue_depth; 1117 1115 WARN_ON_ONCE(sdev->max_queue_depth > sdev->budget_map.depth); 1118 - sdev->sdev_bflags = *bflags; 1119 1116 1120 1117 /* 1121 1118 * Ok, the device is now all set up, we can