[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090328040657.GB2155@mit.edu>
Date: Sat, 28 Mar 2009 00:06:57 -0400
From: Theodore Tso <tytso@....edu>
To: "J.D. Bakker" <jdb@...tmaker.nl>
Cc: linux-ext4@...r.kernel.org
Subject: Re: Once more: Recovering a damaged ext4 fs?
This patch *might* solve your problem. I can't be sure because I
haven't been able to reproduce the soft lockup problem when rm'ing a
file yet. But if it's happening fairly often, it might be worth a
try; it definitely fixes a real bug in ext4 --- I'm just not sure it's
*your* bug. :-)
- Ted
commit 73cda61b58a060b6691791a44c01c16155617451
Author: Theodore Ts'o <tytso@....edu>
Date: Fri Mar 27 19:43:21 2009 -0400
ext4: fix locking typo in mballoc which could cause soft lockup hangs
Smatch (http://repo.or.cz/w/smatch.git/) complains about the locking in
ext4_mb_add_n_trim() from fs/ext4/mballoc.c
4438 list_for_each_entry_rcu(tmp_pa, &lg->lg_prealloc_list[order],
4439 pa_inode_list) {
4440 spin_lock(&tmp_pa->pa_lock);
4441 if (tmp_pa->pa_deleted) {
4442 spin_unlock(&pa->pa_lock);
4443 continue;
4444 }
Brown paper bag time...
Reported-by: Dan Carpenter <error27@...il.com>
Reviewed-by: Eric Sandeen <sandeen@...hat.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@...il.com>
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
Cc: stable@...nel.org
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 4f2f476..12d1081 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4389,7 +4389,7 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)
pa_inode_list) {
spin_lock(&tmp_pa->pa_lock);
if (tmp_pa->pa_deleted) {
- spin_unlock(&pa->pa_lock);
+ spin_unlock(&tmp_pa->pa_lock);
continue;
}
if (!added && pa->pa_free < tmp_pa->pa_free) {
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists