]> git.karo-electronics.de Git - karo-tx-linux.git/commit
freezer: clean up freeze_processes() failure path
authorTejun Heo <tj@kernel.org>
Sat, 20 Aug 2011 09:31:40 +0000 (11:31 +0200)
committerTejun Heo <tj@kernel.org>
Sat, 20 Aug 2011 09:31:40 +0000 (11:31 +0200)
commit6d29b940714eb1ded8053d0f2db457e6a4cd85c4
treeb95dea16d6ccee1d0517928f0cfb24c3fba4cdef
parentc7ef9e9f4e221fb3c5f5b9808e7e4f1b4e13c79d
freezer: clean up freeze_processes() failure path

freeze_processes() failure path is rather messy.  Freezing is canceled
for workqueues and tasks which aren't frozen yet but frozen tasks are
left alone and should be thawed by the caller and of course some
callers (xen and kexec) didn't do it.

This patch updates __thaw_task() to handle cancelation correctly and
makes thaw_processes() call thaw_processes() on failure instead so
that the system is fully thawed on failure.  Unnecessary
thaw_processes() calls are removed from kernel/power/hibernate.c and
user.c.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/freezer.h
kernel/freezer.c
kernel/power/hibernate.c
kernel/power/process.c
kernel/power/user.c