From: George Cherian Date: Fri, 8 Nov 2013 05:20:52 +0000 (+0530) Subject: usb: gadget: f_mass_storage: call try_to_freeze only when its safe X-Git-Tag: v3.13-rc4~47^2~15^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cf93bea3d7b2dbf1e0ebfa9d381aad1b637e2aa;p=pandora-kernel.git usb: gadget: f_mass_storage: call try_to_freeze only when its safe Call try_to_freeze() in sleep_thread() only when it's safe to sleep. do_read() and do_write() calls sleep_thread with lock held. Make sure these won't call try_to_freeze() by passing can_freeze flag to sleep_thread. Calling try_to_freeze() with a lock hold was done since day one in f_mass_storage but since commit 0f9548ca1 ("lockdep: check that no locks held at freeze time") lockdep complains about it. Signed-off-by: George Cherian Acked-by: Sebastian Andrzej Siewior Acked-by: Alan Stern Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed