From: Jan Kara Date: Tue, 25 Dec 2012 18:29:52 +0000 (-0500) Subject: ext4: fix deadlock in journal_unmap_buffer() X-Git-Tag: v3.8-rc2~9^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53e872681fed6a43047e71bf927f77d06f467988;p=pandora-kernel.git ext4: fix deadlock in journal_unmap_buffer() We cannot wait for transaction commit in journal_unmap_buffer() because we hold page lock which ranks below transaction start. We solve the issue by bailing out of journal_unmap_buffer() and jbd2_journal_invalidatepage() with -EBUSY. Caller is then responsible for waiting for transaction commit to finish and try invalidation again. Since the issue can happen only for page stradding i_size, it is simple enough to manually call jbd2_journal_invalidatepage() for such page from ext4_setattr(), check the return value and wait if necessary. Signed-off-by: Jan Kara Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed