mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 23:48:56 -04:00
ceph: fix direct io truncate offset
truncate_inode_pages_range wants the end offset to align with the last byte in a page. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
@@ -665,7 +665,8 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
|
||||
* throw out any page cache pages in this range. this
|
||||
* may block.
|
||||
*/
|
||||
truncate_inode_pages_range(inode->i_mapping, pos, pos+len);
|
||||
truncate_inode_pages_range(inode->i_mapping, pos,
|
||||
(pos+len) | (PAGE_CACHE_SIZE-1));
|
||||
} else {
|
||||
pages = alloc_page_vector(num_pages);
|
||||
if (IS_ERR(pages)) {
|
||||
|
||||
Reference in New Issue
Block a user