From: Romit Dasgupta <romit@ti.com>
To: jens.axboe@oracle.com, rjw@sisk.pl, pavel@ucw.cz
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-pm@lists.linux-foundation.org
Subject: [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them
Date: Wed, 11 Nov 2009 14:00:16 +0530 [thread overview]
Message-ID: <1257928216.15415.57.camel@boson> (raw)
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)
next reply other threads:[~2009-11-11 8:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 8:30 Romit Dasgupta [this message]
2009-11-11 10:34 ` [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them Pavel Machek
2009-11-11 10:34 ` Pavel Machek
2009-11-11 11:30 ` Rafael J. Wysocki
2009-11-11 11:50 ` Romit Dasgupta
2009-11-11 11:59 ` Rafael J. Wysocki
2009-11-11 11:59 ` Rafael J. Wysocki
2009-11-11 11:50 ` Romit Dasgupta
2009-11-11 19:37 ` Jens Axboe
2009-11-11 20:41 ` Rafael J. Wysocki
2009-11-11 20:41 ` Rafael J. Wysocki
2009-11-12 11:52 ` Romit Dasgupta
2009-11-12 12:05 ` Jens Axboe
2009-11-12 12:05 ` Jens Axboe
2009-11-12 11:52 ` Romit Dasgupta
2009-11-11 19:37 ` Jens Axboe
2009-11-11 11:30 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2009-11-11 8:30 Romit Dasgupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1257928216.15415.57.camel@boson \
--to=romit@ti.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.