Signed-off-by: Andrew Morton --- 25-akpm/fs/reiser4/plugin/item/tail.c | 6 +++--- 25-akpm/fs/reiser4/status_flags.c | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff -puN fs/reiser4/status_flags.c~reiser4-kmap-atomic-fixes fs/reiser4/status_flags.c --- 25/fs/reiser4/status_flags.c~reiser4-kmap-atomic-fixes Fri Nov 12 16:02:15 2004 +++ 25-akpm/fs/reiser4/status_flags.c Fri Nov 12 16:02:15 2004 @@ -72,16 +72,16 @@ reiser4_internal int reiser4_status_init return -EIO; } - statuspage = kmap_atomic(page, KM_USER0); + statuspage = (struct reiser4_status *)kmap_atomic(page, KM_USER0); if ( memcmp( statuspage->magic, REISER4_STATUS_MAGIC, sizeof(REISER4_STATUS_MAGIC)) ) { /* Magic does not match. */ - kunmap_atomic(page, KM_USER0); + kunmap_atomic((char *)statuspage, KM_USER0); warning("green-2008", "Wrong magic in status block\n"); __free_pages(page, 0); bio_put(bio); return -EINVAL; } - kunmap_atomic(page, KM_USER0); + kunmap_atomic((char *)statuspage, KM_USER0); get_super_private(sb)->status_page = page; get_super_private(sb)->status_bio = bio; @@ -100,7 +100,8 @@ reiser4_internal int reiser4_status_quer if ( !get_super_private(sb)->status_page ) { // No status page? return REISER4_STATUS_MOUNT_UNKNOWN; } - statuspage = kmap_atomic(get_super_private(sb)->status_page, KM_USER0); + statuspage = (struct reiser4_status *) + kmap_atomic(get_super_private(sb)->status_page, KM_USER0); switch ( (long)d64tocpu(&statuspage->status) ) { // FIXME: this cast is a hack for 32 bit arches to work. case REISER4_STATUS_OK: retval = REISER4_STATUS_MOUNT_OK; @@ -123,7 +124,7 @@ reiser4_internal int reiser4_status_quer if ( extended ) *extended = d64tocpu(&statuspage->extended_status); - kunmap_atomic(get_super_private(sb)->status_page, KM_USER0); + kunmap_atomic((char *)statuspage, KM_USER0); return retval; } @@ -139,7 +140,8 @@ reiser4_status_write(u64 status, u64 ext if ( !get_super_private(sb)->status_page ) { // No status page? return -1; } - statuspage = kmap_atomic(get_super_private(sb)->status_page, KM_USER0); + statuspage = (struct reiser4_status *) + kmap_atomic(get_super_private(sb)->status_page, KM_USER0); cputod64(status, &statuspage->status); cputod64(extended_status, &statuspage->extended_status); @@ -163,7 +165,7 @@ reiser4_status_write(u64 status, u64 ext #undef GETFRAME #endif - kunmap_atomic(get_super_private(sb)->status_page, KM_USER0); + kunmap_atomic((char *)statuspage, KM_USER0); bio->bi_bdev = sb->s_bdev; bio->bi_io_vec[0].bv_page = get_super_private(sb)->status_page; bio->bi_io_vec[0].bv_len = sb->s_blocksize; diff -puN fs/reiser4/plugin/item/tail.c~reiser4-kmap-atomic-fixes fs/reiser4/plugin/item/tail.c --- 25/fs/reiser4/plugin/item/tail.c~reiser4-kmap-atomic-fixes Fri Nov 12 16:02:15 2004 +++ 25-akpm/fs/reiser4/plugin/item/tail.c Fri Nov 12 16:02:15 2004 @@ -340,7 +340,7 @@ reiser4_internal int do_readpage_tail(uf /* lookup until page is filled up. */ for (mapped = 0; mapped < PAGE_CACHE_SIZE; mapped += count) { - void *pagedata; + char *pagedata; /* number of bytes to be copied to page. */ count = item_length_by_coord(&coord) - coord.unit_pos; @@ -352,13 +352,13 @@ reiser4_internal int do_readpage_tail(uf pagedata = kmap_atomic(page, KM_USER0); /* copying tail body to page. */ - xmemcpy((char *)(pagedata + mapped), + xmemcpy(pagedata + mapped, ((char *)item_body_by_coord(&coord) + coord.unit_pos), count); flush_dcache_page(page); /* dettaching page from address space. */ - kunmap_atomic(page, KM_USER0); + kunmap_atomic(pagedata, KM_USER0); /* Getting next tail item. */ if (mapped + count < PAGE_CACHE_SIZE) { _