diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e7a66789fc3c05..bd989e61333a60 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4225,7 +4225,8 @@ int ext4_truncate(struct inode *inode) /* If we zero-out tail of the page, we have to create jinode for jbd2 */ if (inode->i_size & (inode->i_sb->s_blocksize - 1)) { - if (ext4_inode_attach_jinode(inode) < 0) + err = ext4_inode_attach_jinode(inode); + if (err) goto out_trace; }