X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fbtrfs%2Ffile.c;h=6bd5ce9d75f0ab8eaca5a2f808bfaf5a66132742;hb=27eb427bdc0960ad64b72da03e3596c801e7a9e9;hp=cfa243c3ad13c7ee84b0b0f32eccd87c4c205c42;hpb=2959a32a858a2c44bbbce83d19c158d54cc5998a;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index cfa243c3ad13..6bd5ce9d75f0 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -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