Loop driver: Use page_cache_xx Signed-off-by: Christoph Lameter --- drivers/block/loop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: vps/drivers/block/loop.c =================================================================== --- vps.orig/drivers/block/loop.c 2007-06-14 21:45:06.000000000 -0700 +++ vps/drivers/block/loop.c 2007-06-14 21:47:34.000000000 -0700 @@ -215,8 +215,8 @@ static int do_lo_send_aops(struct loop_d int len, ret; mutex_lock(&mapping->host->i_mutex); - index = pos >> PAGE_CACHE_SHIFT; - offset = pos & ((pgoff_t)PAGE_CACHE_SIZE - 1); + index = page_cache_index(mapping, pos); + offset = page_cache_offset(mapping, pos); bv_offs = bvec->bv_offset; len = bvec->bv_len; while (len > 0) { @@ -226,8 +226,8 @@ static int do_lo_send_aops(struct loop_d struct page *page; void *fsdata; - IV = ((sector_t)index << (PAGE_CACHE_SHIFT - 9))+(offset >> 9); - size = PAGE_CACHE_SIZE - offset; + IV = ((sector_t)index << (page_cache_shift(mapping) - 9))+(offset >> 9); + size = page_cache_size(mapping) - offset; if (size > len) size = len; @@ -393,7 +393,7 @@ lo_read_actor(read_descriptor_t *desc, s struct loop_device *lo = p->lo; sector_t IV; - IV = ((sector_t) page->index << (PAGE_CACHE_SHIFT - 9))+(offset >> 9); + IV = ((sector_t) page->index << (page_cache_shift(page_mapping(page)) - 9))+(offset >> 9); if (size > count) size = count;