inode.c (ea9b395fe20ac74be788f415af2622ac8f0c35c7) | inode.c (634725a92938b0f282b17cec0b007dca77adebd2) |
---|---|
1/* 2 * linux/fs/hfsplus/inode.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Inode handling routines --- 4 unchanged lines hidden (view full) --- 13#include <linux/pagemap.h> 14#include <linux/mpage.h> 15 16#include "hfsplus_fs.h" 17#include "hfsplus_raw.h" 18 19static int hfsplus_readpage(struct file *file, struct page *page) 20{ | 1/* 2 * linux/fs/hfsplus/inode.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Inode handling routines --- 4 unchanged lines hidden (view full) --- 13#include <linux/pagemap.h> 14#include <linux/mpage.h> 15 16#include "hfsplus_fs.h" 17#include "hfsplus_raw.h" 18 19static int hfsplus_readpage(struct file *file, struct page *page) 20{ |
21 //printk("readpage: %lu\n", page->index); | |
22 return block_read_full_page(page, hfsplus_get_block); 23} 24 25static int hfsplus_writepage(struct page *page, struct writeback_control *wbc) 26{ | 21 return block_read_full_page(page, hfsplus_get_block); 22} 23 24static int hfsplus_writepage(struct page *page, struct writeback_control *wbc) 25{ |
27 //printk("writepage: %lu\n", page->index); | |
28 return block_write_full_page(page, hfsplus_get_block, wbc); 29} 30 31static int hfsplus_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) 32{ 33 return cont_prepare_write(page, from, to, hfsplus_get_block, 34 &HFSPLUS_I(page->mapping->host).phys_size); 35} --- 51 unchanged lines hidden (view full) --- 87 res = 0; 88 break; 89 } 90 hfs_bnode_unhash(node); 91 hfs_bnode_free(node); 92 } while (--i && nidx < tree->node_count); 93 spin_unlock(&tree->hash_lock); 94 } | 26 return block_write_full_page(page, hfsplus_get_block, wbc); 27} 28 29static int hfsplus_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) 30{ 31 return cont_prepare_write(page, from, to, hfsplus_get_block, 32 &HFSPLUS_I(page->mapping->host).phys_size); 33} --- 51 unchanged lines hidden (view full) --- 85 res = 0; 86 break; 87 } 88 hfs_bnode_unhash(node); 89 hfs_bnode_free(node); 90 } while (--i && nidx < tree->node_count); 91 spin_unlock(&tree->hash_lock); 92 } |
95 //printk("releasepage: %lu,%x = %d\n", page->index, mask, res); | |
96 return res ? try_to_free_buffers(page) : 0; 97} 98 99static int hfsplus_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, 100 struct buffer_head *bh_result, int create) 101{ 102 int ret; 103 --- 358 unchanged lines hidden (view full) --- 462 } else { 463 init_special_inode(inode, inode->i_mode, 464 be32_to_cpu(file->permissions.dev)); 465 } 466 inode->i_atime = hfsp_mt2ut(file->access_date); 467 inode->i_mtime = hfsp_mt2ut(file->content_mod_date); 468 inode->i_ctime = inode->i_mtime; 469 } else { | 93 return res ? try_to_free_buffers(page) : 0; 94} 95 96static int hfsplus_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, 97 struct buffer_head *bh_result, int create) 98{ 99 int ret; 100 --- 358 unchanged lines hidden (view full) --- 459 } else { 460 init_special_inode(inode, inode->i_mode, 461 be32_to_cpu(file->permissions.dev)); 462 } 463 inode->i_atime = hfsp_mt2ut(file->access_date); 464 inode->i_mtime = hfsp_mt2ut(file->content_mod_date); 465 inode->i_ctime = inode->i_mtime; 466 } else { |
470 printk("HFS+-fs: bad catalog entry used to create inode\n"); | 467 printk(KERN_ERR "hfs: bad catalog entry used to create inode\n"); |
471 res = -EIO; 472 } 473 return res; 474} 475 476int hfsplus_cat_write_inode(struct inode *inode) 477{ 478 struct inode *main_inode = inode; --- 66 unchanged lines hidden --- | 468 res = -EIO; 469 } 470 return res; 471} 472 473int hfsplus_cat_write_inode(struct inode *inode) 474{ 475 struct inode *main_inode = inode; --- 66 unchanged lines hidden --- |