Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2031d0f5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge Christoph's freeze cleanup patch

parents 98e7f294 3e1d1d28
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@ refrigerator. Code to do this looks like this:
	do {
		hub_events();
		wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list));
		if (current->flags & PF_FREEZE)
			refrigerator(PF_FREEZE);
		try_to_freeze();
	} while (!signal_pending(current));

from drivers/usb/core/hub.c::hub_thread()
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ place where the thread is safe to be frozen (no kernel semaphores
should be held at that point and it must be safe to sleep there), and
add:

	try_to_freeze(PF_FREEZE);
       try_to_freeze();

If the thread is needed for writing the image to storage, you should
instead set the PF_NOFREEZE process flag when creating the thread (and
+1 −3
Original line number Diff line number Diff line
@@ -536,10 +536,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
	if (!user_mode(regs))
		return 1;

	if (current->flags & PF_FREEZE) {
		refrigerator(0);
	if (try_to_freeze())
		goto no_signal;
	}

	if (!oldset)
		oldset = &current->blocked;
+1 −3
Original line number Diff line number Diff line
@@ -517,10 +517,8 @@ asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset)
	if ((regs->ccr & 0x10))
		return 1;

	if (current->flags & PF_FREEZE) {
		refrigerator(0);
	if (try_to_freeze())
		goto no_signal;
	}

	current->thread.esp0 = (unsigned long) regs;

+1 −1
Original line number Diff line number Diff line
@@ -573,7 +573,7 @@ static int balanced_irq(void *unused)
	for ( ; ; ) {
		set_current_state(TASK_INTERRUPTIBLE);
		time_remaining = schedule_timeout(time_remaining);
		try_to_freeze(PF_FREEZE);
		try_to_freeze();
		if (time_after(jiffies,
				prev_balance_time+balanced_irq_interval)) {
			preempt_disable();
Loading