From: Aneesh Kumar K.V Date: Fri, 15 Feb 2008 17:47:21 +0000 (-0500) Subject: ext4: Fix locking hierarchy violation in ext4_fallocate() X-Git-Tag: v2.6.25-rc4~155^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55bd725aa3a83b3935988f37275b5a80e10d4169;p=pandora-kernel.git ext4: Fix locking hierarchy violation in ext4_fallocate() ext4_fallocate() was trying to acquire i_data_sem outside of jbd2_start_transaction/jbd2_journal_stop, which violates ext4's locking hierarchy. So we take i_mutex to prevent writes and truncates during the complete fallocate operation, and use ext4_get_block_wrap() which acquires and releases i_data_sem for each block allocation. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed