Loading fs/ext4/inode.c +7 −0 Original line number Diff line number Diff line Loading @@ -3788,6 +3788,13 @@ void ext4_truncate(struct inode *inode) struct address_space *mapping = inode->i_mapping; loff_t page_len; /* * There is a possibility that we're either freeing the 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)) Loading Loading
fs/ext4/inode.c +7 −0 Original line number Diff line number Diff line Loading @@ -3788,6 +3788,13 @@ void ext4_truncate(struct inode *inode) struct address_space *mapping = inode->i_mapping; loff_t page_len; /* * There is a possibility that we're either freeing the 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)) Loading