From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 27652] 38-rc1: umount+rmmod cause ext4 error.
Date: Fri, 28 Jan 2011 22:07:57 GMT [thread overview]
Message-ID: <201101282207.p0SM7vIV004578@demeter1.kernel.org> (raw)
In-Reply-To: <bug-27652-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=27652
--- Comment #6 from Eric Sandeen <sandeen@redhat.com> 2011-01-28 22:07:53 ---
Ok it is in fact lazyinit uninit that's falling down, the wait_event is waiting
on something that gets freed.
This fixes it up for me:
Index: linux-2.6/fs/ext4/super.c
===================================================================
--- linux-2.6.orig/fs/ext4/super.c
+++ linux-2.6/fs/ext4/super.c
@@ -77,6 +77,7 @@ static struct dentry *ext4_mount(struct
const char *dev_name, void *data);
static void ext4_destroy_lazyinit_thread(void);
static void ext4_unregister_li_request(struct super_block *sb);
+static void ext4_clear_request_list(void);
#if !defined(CONFIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) &&
defined(CONFIG_EXT4_USE_FOR_EXT23)
static struct file_system_type ext3_fs_type = {
@@ -2704,6 +2705,8 @@ static void ext4_unregister_li_request(s
mutex_unlock(&ext4_li_info->li_list_mtx);
}
+static struct task_struct *ext4_lazyinit_task;
+
/*
* This is the function where ext4lazyinit thread lives. It walks
* through the request list searching for next scheduled filesystem.
@@ -2772,6 +2775,10 @@ cont_thread:
if (time_before(jiffies, next_wakeup))
schedule();
finish_wait(&eli->li_wait_daemon, &wait);
+ if (kthread_should_stop()) {
+ ext4_clear_request_list();
+ goto exit_thread;
+ }
}
exit_thread:
@@ -2796,6 +2803,7 @@ exit_thread:
wake_up(&eli->li_wait_task);
kfree(ext4_li_info);
+ ext4_lazyinit_task = NULL;
ext4_li_info = NULL;
mutex_unlock(&ext4_li_mtx);
@@ -2818,11 +2826,10 @@ static void ext4_clear_request_list(void
static int ext4_run_lazyinit_thread(void)
{
- struct task_struct *t;
-
- t = kthread_run(ext4_lazyinit_thread, ext4_li_info, "ext4lazyinit");
- if (IS_ERR(t)) {
- int err = PTR_ERR(t);
+ ext4_lazyinit_task = kthread_run(ext4_lazyinit_thread,
+ ext4_li_info, "ext4lazyinit");
+ if (IS_ERR(ext4_lazyinit_task)) {
+ int err = PTR_ERR(ext4_lazyinit_task);
ext4_clear_request_list();
del_timer_sync(&ext4_li_info->li_timer);
kfree(ext4_li_info);
@@ -2976,13 +2983,7 @@ static void ext4_destroy_lazyinit_thread
if (!ext4_li_info)
return;
- ext4_clear_request_list();
next prev parent reply other threads:[~2011-01-28 22:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 20:27 [Bug 27652] New: 38-rc1: umount+rmmod cause ext4 error bugzilla-daemon
2011-01-26 20:28 ` [Bug 27652] " bugzilla-daemon
2011-01-26 20:41 ` bugzilla-daemon
2011-01-28 6:01 ` bugzilla-daemon
2011-01-28 17:15 ` bugzilla-daemon
2011-01-28 17:32 ` bugzilla-daemon
2011-01-28 22:07 ` bugzilla-daemon [this message]
2011-01-29 12:03 ` bugzilla-daemon
2011-01-30 2:36 ` bugzilla-daemon
2011-01-30 2:41 ` bugzilla-daemon
2011-01-30 19:47 ` bugzilla-daemon
2011-01-30 21:07 ` bugzilla-daemon
2011-01-31 16:08 ` bugzilla-daemon
2011-01-31 17:55 ` bugzilla-daemon
2011-01-31 17:57 ` bugzilla-daemon
2011-02-09 2:01 ` bugzilla-daemon
2011-02-09 4:50 ` bugzilla-daemon
2011-02-09 9:42 ` bugzilla-daemon
2011-02-12 22:39 ` bugzilla-daemon
2011-02-02 23:02 2.6.38-rc3-git1: Reported regressions from 2.6.37 Rafael J. Wysocki
2011-02-02 23:31 ` [Bug #27652] 38-rc1: umount+rmmod cause ext4 error Rafael J. Wysocki
2011-02-02 23:31 ` Rafael J. Wysocki
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=201101282207.p0SM7vIV004578@demeter1.kernel.org \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@vger.kernel.org \
/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.