+++ /dev/null
-There will cause a deadlock if invoke ext4_truncate with i_mutex locked
-in lustre. Since lustre has own lock to provide protect so we don't
-need this check at all.
-
-Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/inode.c
-===================================================================
---- linux-3.10.0-229.1.2.fc21.x86_64.orig/fs/ext4/inode.c
-+++ linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/inode.c
-@@ -3644,8 +3644,6 @@ void ext4_truncate(struct inode *inode)
- * or it completely new indode. In those cases we might not
- * have i_mutex locked because it's not necessary.
- */
-- if (!(inode->i_state & (I_NEW|I_FREEING)))
-- WARN_ON(!mutex_is_locked(&inode->i_mutex));
- trace_ext4_truncate_enter(inode);
-
- if (!ext4_can_truncate(inode))