Whamcloud - gitweb
LU-6199 ldiskfs: delete bad WARN_ON_ONCE from ldiskfs
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel6.6 / ext4-remove-truncate-warning.patch
1 Invoking ext4_truncate with i_mutex locked will cause a deadlock
2 in lustre. Since lustre has own lock to provide protection we don't
3 need this check at all.
4
5 Index: linux-2.6.32-504.el6.x86_64/fs/ext4/inode.c
6 ===================================================================
7 --- linux-2.6.32-504.el6.x86_64.orig/fs/ext4/inode.c
8 +++ linux-3.10.0-504.el6.x86_64/fs/ext4/inode.c
9 @@ -3934,8 +3934,6 @@ void ext4_end_io_work(struct work_struct
10  int ext4_flush_unwritten_io(struct inode *inode)
11  {
12         int ret;
13 -       WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex) &&
14 -                    !(inode->i_state & I_FREEING));
15         ret = ext4_do_flush_completed_IO(inode, NULL);
16         ext4_unwritten_wait(inode);
17         return ret;