diff options
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 7237b6326722..99f30b9cfe17 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4061,7 +4061,7 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) WARN_ON_ONCE(!inode_is_locked(inode)); /* No need to punch hole beyond i_size */ - if (offset >= inode->i_size) + if (offset >= inode->i_size || offset >= max_end) return 0; /* |