]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb_storage: don't use set_freezable_with_signal()
authorTejun Heo <tj@kernel.org>
Thu, 3 Nov 2011 22:19:29 +0000 (15:19 -0700)
committerTejun Heo <tj@kernel.org>
Thu, 3 Nov 2011 22:19:29 +0000 (15:19 -0700)
commit137a063d7c9d6f29c24dc88a71fe0246aa2e494d
tree7852ae71916c0cb445c11f3c3ad5b635da1bc986
parent3fa1d9ca98d2fdbdd2b901dd1c29554d38cadfaf
usb_storage: don't use set_freezable_with_signal()

The current implementation of set_freezable_with_signal() is buggy and
tricky to get right.  usb-storage is the only user and its use can be
avoided trivially.

All usb-storage wants is to be able to sleep with timeout and get
woken up if freezing() becomes true.  This can be trivially
implemented by doing interruptible wait w/ freezing() included in the
wait condition.  There's no reason to use set_freezable_with_signal().

Perform interruptible wait on freezing() instead of using
set_freezable_with_signal(), which is scheduled for removal.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/usb.c