Re: [BUG] INFO: inconsistent lock state

From: Paul Bolle
Date: Mon Sep 26 2011 - 05:34:54 EST


On Mon, 2011-09-26 at 10:40 +0200, Paul Bolle wrote:
> Something very similar happened to be in the logs of a machine running
> v3.0.4 too. It happened a few days ago (but I missed it initially). I
> have no idea what triggered this:
>
> kernel: [ 3501.569697]
> kernel: [ 3501.569699] =================================
> kernel: [ 3501.569703] [ INFO: inconsistent lock state ]
> kernel: [ 3501.569706] 3.0.4-local0.fc14.x86_64 #1
> kernel: [ 3501.569708] ---------------------------------
> kernel: [ 3501.569711] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
> kernel: [ 3501.569714] kswapd0/25 [HC0[0]:SC0[0]:HE1:SE1] takes:
> kernel: [ 3501.569717] (&sb->s_type->i_mutex_key#13){+.+.?.}, at: [<ffffffff811b08eb>] ext4_evict_inode+0x41/0x255
> [...]

A bit of background: ext4_evict_inode+0x41 should be the call to
mutex_lock() in ext4_evict_inode():

(gdb) disass /m ext4_evict_inode+48,+17
Dump of assembler code from 0xffffffff811b08da to 0xffffffff811b08eb:
193 mutex_lock(&inode->i_mutex);
0xffffffff811b08da <ext4_evict_inode+48>: lea 0x80(%rbx),%r12
0xffffffff811b08e1 <ext4_evict_inode+55>: xor %esi,%esi
0xffffffff811b08e3 <ext4_evict_inode+57>: mov %r12,%rdi
0xffffffff811b08e6 <ext4_evict_inode+60>: callq 0xffffffff814edf03 <mutex_lock_nested>

End of assembler dump.

That call to mutex_lock() and the following call to mutex_unlock() was
added by the backport of commit 2581fdc8 ("ext4: call ext4_ioend_wait
and ext4_flush_completed_IO in ext4_evict_inode") to v3.0 in the v3.0.4
patch.


Paul Bolle

--
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/