From: Jan Kara Date: Tue, 3 May 2011 15:12:58 +0000 (-0400) Subject: ext4: fix deadlock in ext4_symlink() in ENOSPC conditions X-Git-Tag: v3.0-rc1~140^2~51 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df5e6223407e3e645065c4bd968fee007f0e0287;p=pandora-kernel.git ext4: fix deadlock in ext4_symlink() in ENOSPC conditions ext4_symlink() cannot call __page_symlink() with transaction open. __page_symlink() calls ext4_write_begin() which can wait for transaction commit if we are running out of space thus causing a deadlock. Also error recovery in ext4_truncate_failed_write() does not count with the transaction being already started (although I'm not aware of any particular deadlock here). Fix the problem by stopping a transaction before calling __page_symlink() (we have to be careful and put inode to orphan list so that it gets deleted in case of crash) and starting another one after __page_symlink() returns for addition of symlink into a directory. Signed-off-by: Jan Kara Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed