summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2014-04-18 10:21:15 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-04-18 10:21:15 -0400
commit694c793fc1ade0946149c5f8d43f71e0728c4e81 (patch)
tree6fffd99f193595aa55981aa3c5296d56a766878a /fs
parent50e02fd84543d82e663000e780e0ec0cfde52283 (diff)
downloadlinux-694c793fc1ade0946149c5f8d43f71e0728c4e81.tar.bz2
ext4: use truncate_pagecache() in collapse range
We should be using truncate_pagecache() instead of truncate_pagecache_range() in the collapse range because we're truncating page cache from offset to the end of file. truncate_pagecache() also get rid of the private COWed pages from the range because we're going to shift the end of the file. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 64b400356cad..3de9b2d7028c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5437,7 +5437,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
goto out_mutex;
}
- truncate_pagecache_range(inode, offset, -1);
+ truncate_pagecache(inode, offset);
/* Wait for existing dio to complete */
ext4_inode_block_unlocked_dio(inode);