rip->i_size is a target length without trailing '\0'. Reported by Ben Gras.
When remove dentry, check if cached position is greater than removed one.