]> git.baikalelectronics.ru Git - kernel.git/commit
PM/Hibernate: Fix waiting for image device to appear on resume
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 24 Apr 2009 22:16:06 +0000 (00:16 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Apr 2009 22:31:30 +0000 (15:31 -0700)
commit9cb800c7ee7a01d12e95873c7a33abc83d4132f0
tree64e594f2846d997213890b59168307d12e676ff0
parent23b78a84a833f8b6c330e15f9ec693da40a598be
PM/Hibernate: Fix waiting for image device to appear on resume

Commit 99004bb7fe8dcc1e08a5aea02384b916964f56d4 ("PM/Hibernate: Wait for
SCSI devices scan to complete during resume") added a call to
scsi_complete_async_scans() to software_resume(), so that it waited for
the SCSI scanning to complete, but the call was added at a wrong place.

Namely, it should have been added after wait_for_device_probe(), which
is called only if the image partition hasn't been specified yet.  Also,
it's reasonable to check if the image partition is present and only wait
for the device probing and SCSI scanning to complete if it is not the
case.

Additionally, since noresume is checked right at the beginning of
software_resume() and the function returns immediately if it's set, it
doesn't make sense to check it once again later.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/disk.c