diff --git a/mm/shmem.c b/mm/shmem.c index ea5a70cfc1d8..80297712314e 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2155,7 +2155,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, /* Remove the !PageUptodate pages we added */ shmem_undo_range(inode, (loff_t)start << PAGE_CACHE_SHIFT, - (loff_t)index << PAGE_CACHE_SHIFT, true); + ((loff_t)index << PAGE_CACHE_SHIFT) - 1, true); goto undone; }