Message ID | 1397820124-16885-1-git-send-email-lczerner@redhat.com |
---|---|
State | Accepted, archived |
Headers | show |
On Fri, Apr 18, 2014 at 01:22:04PM +0200, Lukas Czerner wrote: > 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> Thanks, applied. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 5fa31cb..3a6e40c 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5406,7 +5406,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);
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> --- fs/ext4/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)