linux-uconsole/fs/jbd
Jan Kara 1c4e871038 jbd: Fix lock ordering bug in journal_unmap_buffer()
commit 25389bb207 upstream.

Commit 09e05d48 introduced a wait for transaction commit into
journal_unmap_buffer() in the case we are truncating a buffer undergoing commit
in the page stradding i_size on a filesystem with blocksize < pagesize. Sadly
we forgot to drop buffer lock before waiting for transaction commit and thus
deadlock is possible when kjournald wants to lock the buffer.

Fix the problem by dropping the buffer lock before waiting for transaction
commit. Since we are still holding page lock (and that is OK), buffer cannot
disappear under us.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03 12:59:14 -08:00
..
checkpoint.c jbd: Convert atomic_inc() to get_bh() 2010-10-28 01:30:05 +02:00
commit.c jbd: Fix assertion failure in commit code due to lacking transaction credits 2012-10-21 09:17:12 -07:00
journal.c jbd/jbd2: validate sb->s_first in journal_get_superblock() 2011-12-21 12:57:40 -08:00
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile
recovery.c jbd: Move debug message into #ifdef area 2010-10-28 01:30:01 +02:00
revoke.c Fix common misspellings 2011-03-31 11:26:23 -03:00
transaction.c jbd: Fix lock ordering bug in journal_unmap_buffer() 2012-12-03 12:59:14 -08:00