diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-18 12:04:45 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 23:37:19 +0200 |
commit | e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3 (patch) | |
tree | aa9666b080dc75ef3fa27992f042a422f7a979b7 /drivers/usb/storage | |
parent | freezer: prevent new tasks from inheriting TIF_FREEZE set (diff) | |
download | linux-e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3.tar.xz linux-e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3.zip |
freezer: introduce freezer-friendly waiting macros
Introduce freezer-friendly wrappers around wait_event_interruptible() and
wait_event_interruptible_timeout(), originally defined in <linux/wait.h>, to
be used in freezable kernel threads. Make some of the freezable kernel
threads use them.
This is necessary for the freezer to stop sending signals to kernel threads,
which is implemented in the next patch.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/usb.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 3451e8d03ab0..ac6114eea0c3 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -907,12 +907,9 @@ static int usb_stor_scan_thread(void * __us) if (delay_use > 0) { printk(KERN_DEBUG "usb-storage: waiting for device " "to settle before scanning\n"); -retry: - wait_event_interruptible_timeout(us->delay_wait, + wait_event_freezable_timeout(us->delay_wait, test_bit(US_FLIDX_DISCONNECTING, &us->flags), delay_use * HZ); - if (try_to_freeze()) - goto retry; } /* If the device is still connected, perform the scanning */ |