summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 45745aae478..ae438d02a42 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -900,7 +900,7 @@ get_more_pages:
}
/* submit the write */
- offset = req->r_data_out.pages[0]->index << PAGE_CACHE_SHIFT;
+ offset = page_offset(req->r_data_out.pages[0]);
len = min((snap_size ? snap_size : i_size_read(inode)) - offset,
(u64)locked_pages << PAGE_CACHE_SHIFT);
dout("writepages got %d pages at %llu~%llu\n",