diff options
author | Sage Weil <sage@newdream.net> | 2010-04-22 22:48:59 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-03 19:49:25 +0200 |
commit | 5c6a2cdb4fe8aaf6b54f022c14f13d2a12b45914 (patch) | |
tree | 68b777f391b68f91ba8c587ded4f9d9526f9279a /fs/ceph/file.c | |
parent | ceph: discard incoming messages with bad seq # (diff) | |
download | linux-5c6a2cdb4fe8aaf6b54f022c14f13d2a12b45914.tar.xz linux-5c6a2cdb4fe8aaf6b54f022c14f13d2a12b45914.zip |
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>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r-- | fs/ceph/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 4add3d5da2c1..ed6f19721d6e 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -665,7 +665,8 @@ more: * 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)) { |