ceph: use page_offset() in ceph_writepages_start()

There's one spot in ceph_writepages_start() that open-codes what
page_offset() does safely.  Use the macro so we don't have to worry
about wrapping.

This resolves:
    http://tracker.ceph.com/issues/4648

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Alex Elder 2013-04-03 15:03:53 -05:00 committed by Sage Weil
parent ef4859d647
commit 25d71cb92d
1 changed files with 1 additions and 1 deletions

View File

@ -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",