aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 2a571fb4803b..e53f24b15b12 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -314,7 +314,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
314 return PTR_ERR(req); 314 return PTR_ERR(req);
315 315
316 /* build page vector */ 316 /* build page vector */
317 nr_pages = len >> PAGE_CACHE_SHIFT; 317 nr_pages = calc_pages_for(0, len);
318 pages = kmalloc(sizeof(*pages) * nr_pages, GFP_NOFS); 318 pages = kmalloc(sizeof(*pages) * nr_pages, GFP_NOFS);
319 ret = -ENOMEM; 319 ret = -ENOMEM;
320 if (!pages) 320 if (!pages)