Whamcloud - gitweb
LU-7608 kernel: kernel upgrade [SLES12 SP1 3.12.51-60.25]
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles12 / ext4-remove-truncate-warning.patch
1 There will cause a deadlock if invoke ext4_truncate with i_mutex locked
2 in lustre. Since lustre has own lock to provide protect so we don't
3 need this check at all. 
4
5 Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/inode.c
6 ===================================================================
7 --- linux-3.10.0-229.1.2.fc21.x86_64.orig/fs/ext4/inode.c
8 +++ linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/inode.c
9 @@ -3644,8 +3644,6 @@ void ext4_truncate(struct inode *inode)
10          * or it completely new indode. In those cases we might not
11          * have i_mutex locked because it's not necessary.
12          */
13 -       if (!(inode->i_state & (I_NEW|I_FREEING)))
14 -               WARN_ON(!mutex_is_locked(&inode->i_mutex));
15         trace_ext4_truncate_enter(inode);
16  
17         if (!ext4_can_truncate(inode))