projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clk: rockchip: rk3399: Don't allow VPLL as aclk_cci clock source
[firefly-linux-kernel-4.4.55.git]
/
mm
/
shmem.c
diff --git
a/mm/shmem.c
b/mm/shmem.c
index b82e56ebabdd6ed7e1f270d504d80e7e8fa24811..79997e8cf807c54b8a8217df6f9b70ef9f4e981f 100644
(file)
--- a/
mm/shmem.c
+++ b/
mm/shmem.c
@@
-2153,9
+2153,11
@@
static long shmem_fallocate(struct file *file, int mode, loff_t offset,
NULL);
if (error) {
/* Remove the !PageUptodate pages we added */
NULL);
if (error) {
/* Remove the !PageUptodate pages we added */
- shmem_undo_range(inode,
- (loff_t)start << PAGE_CACHE_SHIFT,
- (loff_t)index << PAGE_CACHE_SHIFT, true);
+ if (index > start) {
+ shmem_undo_range(inode,
+ (loff_t)start << PAGE_CACHE_SHIFT,
+ ((loff_t)index << PAGE_CACHE_SHIFT) - 1, true);
+ }
goto undone;
}
goto undone;
}