|
@@ -4862,8 +4862,9 @@ int ocfs2_reflink_remap_range(struct file *file_in,
|
|
SINGLE_DEPTH_NESTING);
|
|
SINGLE_DEPTH_NESTING);
|
|
|
|
|
|
/* Zap any page cache for the destination file's range. */
|
|
/* Zap any page cache for the destination file's range. */
|
|
- truncate_inode_pages_range(&inode_out->i_data, pos_out,
|
|
|
|
- PAGE_ALIGN(pos_out + len) - 1);
|
|
|
|
|
|
+ truncate_inode_pages_range(&inode_out->i_data,
|
|
|
|
+ round_down(pos_out, PAGE_SIZE),
|
|
|
|
+ round_up(pos_out + len, PAGE_SIZE) - 1);
|
|
|
|
|
|
ret = ocfs2_reflink_remap_blocks(inode_in, in_bh, pos_in, inode_out,
|
|
ret = ocfs2_reflink_remap_blocks(inode_in, in_bh, pos_in, inode_out,
|
|
out_bh, pos_out, len);
|
|
out_bh, pos_out, len);
|