Skip to content

Commit 43a8d39

Browse files
djbwJames Bottomley
authored andcommitted
[SCSI] fix async probe regression
Commit a7a20d1 "[SCSI] sd: limit the scope of the async probe domain" moved sd probe work out of reach of wait_for_device_probe(). Allow it to be synced via scsi_complete_async_scans(). Reported-by: Meelis Roos <mroos@linux.ee> Tested-by: Meelis Roos <mroos@linux.ee> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent b83d543 commit 43a8d39

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/scsi/scsi_scan.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ int scsi_complete_async_scans(void)
147147

148148
do {
149149
if (list_empty(&scanning_hosts))
150-
return 0;
150+
goto out;
151151
/* If we can't get memory immediately, that's OK. Just
152152
* sleep a little. Even if we never get memory, the async
153153
* scans will finish eventually.
@@ -179,8 +179,11 @@ int scsi_complete_async_scans(void)
179179
}
180180
done:
181181
spin_unlock(&async_scan_lock);
182-
183182
kfree(data);
183+
184+
out:
185+
async_synchronize_full_domain(&scsi_sd_probe_domain);
186+
184187
return 0;
185188
}
186189

0 commit comments

Comments
 (0)