Re: 2.6.15-git7 oopses in ext3 during LTP runs

From: Arjan van de Ven
Date: Wed Jan 11 2006 - 15:54:00 EST


On Wed, 2006-01-11 at 12:46 -0800, Andrew Morton wrote:
> Andi Kleen <ak@xxxxxxx> wrote:
> >
> >
> > Running LTP with the default runfile on a 4 virtual CPU x86-64
> > system gives
> >
> > To reproduce: run ltp 20040908 (newer one will probably work
> > too) with runltp -p -q -l `uname -r` on a ext3 file system
> >
> > config is x86-64 defconfig.
> >
>
> mutex_trylock() is returning the wrong value. fs/super.c:write_super()
> clearly took the lock.


the conversion is buggy.

mutex_trylock has the same convention as spin_try_lock (which is the
opposite of down_trylock). THe conversion forgot to add a !

--- linux-2.6.15/fs/ext3/super.c~ 2006-01-11 21:54:13.000000000 +0100
+++ linux-2.6.15/fs/ext3/super.c 2006-01-11 21:54:13.000000000 +0100
@@ -2150,7 +2150,7 @@

static void ext3_write_super (struct super_block * sb)
{
- if (mutex_trylock(&sb->s_lock) != 0)
+ if (!mutex_trylock(&sb->s_lock) != 0)
BUG();
sb->s_dirt = 0;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/