From 796d6955a51ce6768d0e033f27a2f8f5be6cb39a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 10 Jun 2010 15:50:10 -0700 Subject: ceph: only set num_pages in calc_layout Setting it elsewhere is unnecessary and more fragile. Signed-off-by: Sage Weil --- fs/ceph/osd_client.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index e38522347898..707d2dbd8776 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c @@ -1276,8 +1276,6 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc, /* it may be a short read due to an object boundary */ req->r_pages = pages; - num_pages = calc_pages_for(off, *plen); - req->r_num_pages = num_pages; dout("readpages final extent is %llu~%llu (%d pages)\n", off, *plen, req->r_num_pages); @@ -1319,7 +1317,6 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, /* it may be a short write due to an object boundary */ req->r_pages = pages; - req->r_num_pages = calc_pages_for(off, len); dout("writepages %llu~%llu (%d pages)\n", off, len, req->r_num_pages); -- cgit v1.2.2