aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/addr.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 4469b63c9b7..22b6e4583fa 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -205,7 +205,7 @@ static int readpage_nounlock(struct file *filp, struct page *page)
205 dout("readpage inode %p file %p page %p index %lu\n", 205 dout("readpage inode %p file %p page %p index %lu\n",
206 inode, filp, page, page->index); 206 inode, filp, page, page->index);
207 err = ceph_osdc_readpages(osdc, ceph_vino(inode), &ci->i_layout, 207 err = ceph_osdc_readpages(osdc, ceph_vino(inode), &ci->i_layout,
208 page->index << PAGE_CACHE_SHIFT, &len, 208 (u64) page_offset(page), &len,
209 ci->i_truncate_seq, ci->i_truncate_size, 209 ci->i_truncate_seq, ci->i_truncate_size,
210 &page, 1, 0); 210 &page, 1, 0);
211 if (err == -ENOENT) 211 if (err == -ENOENT)
@@ -286,7 +286,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
286 int nr_pages = 0; 286 int nr_pages = 0;
287 int ret; 287 int ret;
288 288
289 off = page->index << PAGE_CACHE_SHIFT; 289 off = (u64) page_offset(page);
290 290
291 /* count pages */ 291 /* count pages */
292 next_index = page->index; 292 next_index = page->index;
@@ -426,7 +426,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
426 struct ceph_inode_info *ci; 426 struct ceph_inode_info *ci;
427 struct ceph_fs_client *fsc; 427 struct ceph_fs_client *fsc;
428 struct ceph_osd_client *osdc; 428 struct ceph_osd_client *osdc;
429 loff_t page_off = page->index << PAGE_CACHE_SHIFT; 429 loff_t page_off = page_offset(page);
430 int len = PAGE_CACHE_SIZE; 430 int len = PAGE_CACHE_SIZE;
431 loff_t i_size; 431 loff_t i_size;
432 int err = 0; 432 int err = 0;
@@ -817,8 +817,7 @@ get_more_pages:
817 /* ok */ 817 /* ok */
818 if (locked_pages == 0) { 818 if (locked_pages == 0) {
819 /* prepare async write request */ 819 /* prepare async write request */
820 offset = (unsigned long long)page->index 820 offset = (u64) page_offset(page);
821 << PAGE_CACHE_SHIFT;
822 len = wsize; 821 len = wsize;
823 req = ceph_osdc_new_request(&fsc->client->osdc, 822 req = ceph_osdc_new_request(&fsc->client->osdc,
824 &ci->i_layout, 823 &ci->i_layout,
@@ -1180,7 +1179,7 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
1180 struct inode *inode = vma->vm_file->f_dentry->d_inode; 1179 struct inode *inode = vma->vm_file->f_dentry->d_inode;
1181 struct page *page = vmf->page; 1180 struct page *page = vmf->page;
1182 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; 1181 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
1183 loff_t off = page->index << PAGE_CACHE_SHIFT; 1182 loff_t off = page_offset(page);
1184 loff_t size, len; 1183 loff_t size, len;
1185 int ret; 1184 int ret;
1186 1185