From: OGAWA Hirofumi Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton --- 25-akpm/fs/fat/inode.c | 22 +++++++--------------- 1 files changed, 7 insertions(+), 15 deletions(-) diff -puN fs/fat/inode.c~fat-kill-unnecessary-kmap fs/fat/inode.c --- 25/fs/fat/inode.c~fat-kill-unnecessary-kmap Tue Jan 18 14:53:42 2005 +++ 25-akpm/fs/fat/inode.c Tue Jan 18 14:53:42 2005 @@ -1137,30 +1137,22 @@ static int fat_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) { - kmap(page); return cont_prepare_write(page,from,to,fat_get_block, &MSDOS_I(page->mapping->host)->mmu_private); } -static int -fat_commit_write(struct file *file, struct page *page, - unsigned from, unsigned to) -{ - kunmap(page); - return generic_commit_write(file, page, from, to); -} - static sector_t _fat_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,fat_get_block); } + static struct address_space_operations fat_aops = { - .readpage = fat_readpage, - .writepage = fat_writepage, - .sync_page = block_sync_page, - .prepare_write = fat_prepare_write, - .commit_write = fat_commit_write, - .bmap = _fat_bmap + .readpage = fat_readpage, + .writepage = fat_writepage, + .sync_page = block_sync_page, + .prepare_write = fat_prepare_write, + .commit_write = generic_commit_write, + .bmap = _fat_bmap }; /* doesn't deal with root inode */ _