diff options
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r-- | fs/ceph/addr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index e53f24b15b12..e324222acc82 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -309,7 +309,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) | |||
309 | CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ, | 309 | CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ, |
310 | NULL, 0, | 310 | NULL, 0, |
311 | ci->i_truncate_seq, ci->i_truncate_size, | 311 | ci->i_truncate_seq, ci->i_truncate_size, |
312 | NULL, false, 0); | 312 | NULL, false); |
313 | if (IS_ERR(req)) | 313 | if (IS_ERR(req)) |
314 | return PTR_ERR(req); | 314 | return PTR_ERR(req); |
315 | 315 | ||
@@ -338,6 +338,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) | |||
338 | } | 338 | } |
339 | req->r_pages = pages; | 339 | req->r_pages = pages; |
340 | req->r_num_pages = nr_pages; | 340 | req->r_num_pages = nr_pages; |
341 | req->r_page_alignment = 0; | ||
341 | req->r_callback = finish_read; | 342 | req->r_callback = finish_read; |
342 | req->r_inode = inode; | 343 | req->r_inode = inode; |
343 | 344 | ||
@@ -820,7 +821,7 @@ get_more_pages: | |||
820 | snapc, do_sync, | 821 | snapc, do_sync, |
821 | ci->i_truncate_seq, | 822 | ci->i_truncate_seq, |
822 | ci->i_truncate_size, | 823 | ci->i_truncate_size, |
823 | &inode->i_mtime, true, 0); | 824 | &inode->i_mtime, true); |
824 | 825 | ||
825 | if (IS_ERR(req)) { | 826 | if (IS_ERR(req)) { |
826 | rc = PTR_ERR(req); | 827 | rc = PTR_ERR(req); |
@@ -828,6 +829,8 @@ get_more_pages: | |||
828 | break; | 829 | break; |
829 | } | 830 | } |
830 | 831 | ||
832 | req->r_num_pages = calc_pages_for(0, len); | ||
833 | req->r_page_alignment = 0; | ||
831 | max_pages = req->r_num_pages; | 834 | max_pages = req->r_num_pages; |
832 | 835 | ||
833 | alloc_page_vec(fsc, req); | 836 | alloc_page_vec(fsc, req); |