Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / file.c
index cfa243c3ad13c7ee84b0b0f32eccd87c4c205c42..6bd5ce9d75f0ab8eaca5a2f808bfaf5a66132742 100644 (file)
@@ -2655,7 +2655,7 @@ static long btrfs_fallocate(struct file *file, int mode,
                                        alloc_start);
                if (ret)
                        goto out;
-       } else {
+       } else if (offset + len > inode->i_size) {
                /*
                 * If we are fallocating from the end of the file onward we
                 * need to zero out the end of the page if i_size lands in the