public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them
@ 2009-11-11  8:30 Romit Dasgupta
  0 siblings, 0 replies; 9+ messages in thread
From: Romit Dasgupta @ 2009-11-11  8:30 UTC (permalink / raw)
  To: jens.axboe, rjw, pavel; +Cc: linux-pm, linux-omap, linux-kernel

Kicks out frozen bdi flusher task out of the refrigerator when the flusher task
needs to exit.
Signed-off-by: Romit Dasgupta <romit@ti.com>
---
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 5a37e20..c757b05 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -606,8 +606,11 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi)
 	 * Finally, kill the kernel threads. We don't need to be RCU
 	 * safe anymore, since the bdi is gone from visibility.
 	 */
-	list_for_each_entry(wb, &bdi->wb_list, list)
+	list_for_each_entry(wb, &bdi->wb_list, list) {
+		if (unlikely(frozen(wb->task)))
+			wb->task->flags &= ~PF_FROZEN;
 		kthread_stop(wb->task);
+	}
 }
 
 void bdi_unregister(struct backing_dev_info *bdi)

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-12 12:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1257928216.15415.57.camel@boson>
2009-11-11 10:34 ` [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them Pavel Machek
     [not found] ` <20091111103444.GD26423@elf.ucw.cz>
2009-11-11 11:30   ` Rafael J. Wysocki
     [not found]   ` <200911111230.58479.rjw@sisk.pl>
2009-11-11 11:50     ` Romit Dasgupta
     [not found]     ` <1257940231.28810.2.camel@boson>
2009-11-11 11:59       ` Rafael J. Wysocki
2009-11-11 19:37     ` Jens Axboe
     [not found]     ` <20091111193719.GR8742@kernel.dk>
2009-11-11 20:41       ` Rafael J. Wysocki
     [not found]       ` <200911112141.12437.rjw@sisk.pl>
2009-11-12 11:52         ` Romit Dasgupta
     [not found]         ` <1258026726.2341.1.camel@boson>
2009-11-12 12:05           ` Jens Axboe
2009-11-11  8:30 Romit Dasgupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox