diff options
-rw-r--r-- | fs/ceph/addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 45745aae4786..ae438d02a422 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -900,7 +900,7 @@ get_more_pages: | |||
900 | } | 900 | } |
901 | 901 | ||
902 | /* submit the write */ | 902 | /* submit the write */ |
903 | offset = req->r_data_out.pages[0]->index << PAGE_CACHE_SHIFT; | 903 | offset = page_offset(req->r_data_out.pages[0]); |
904 | len = min((snap_size ? snap_size : i_size_read(inode)) - offset, | 904 | len = min((snap_size ? snap_size : i_size_read(inode)) - offset, |
905 | (u64)locked_pages << PAGE_CACHE_SHIFT); | 905 | (u64)locked_pages << PAGE_CACHE_SHIFT); |
906 | dout("writepages got %d pages at %llu~%llu\n", | 906 | dout("writepages got %d pages at %llu~%llu\n", |