Re: [PATCH] jffs2: Move erasing from write_super to GC.

David Woodhouse
2010-05-19T10:05:31Z

On Wed, 2010-05-19 at 11:47 +0200, Joakim Tjernlund wrote:
>
> This looks like a typo and I had to change that to:
> BUG_ON(spin_is_locked(&c->erase_completion_lock));

Hm, no -- we want it to BUG() if the spinlock is _NOT_ locked.

You're building on UP, without preemption or spinlock debugging. In that
case, spinlocks are a no-op. So spin_trylock() _always_ succeeds, and
spin_is_locked() always returns 0.

It should be lockdep_assert_held(), I think.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation