summaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2016-08-04 13:24:41 +0930
committerJoel Stanley <joel@jms.id.au>2016-08-04 13:24:41 +0930
commitb916113d820adc856aad6b8ebc1a25403ff7f293 (patch)
treeabddf239d912c4868faf9fbc69c67d980f74c7df /mm/shmem.c
parent2e4db6c6be91ade074c1a150a6db2aeb4920e25c (diff)
parentb05965f284db3e086022f4e318e46cb5bffb1376 (diff)
downloadtalos-obmc-linux-openbmc-4.4-20160804-1.tar.gz
talos-obmc-linux-openbmc-4.4-20160804-1.zip
Merge tag 'v4.4.16' into dev-4.4openbmc-4.4-20160804-1
This is the 4.4.16 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index ea5a70cfc1d8..1b11ccc0a3b7 100644
--- 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 */
- 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;
}
OpenPOWER on IntegriCloud