diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hfs/extent.c | 6 | ||||
-rw-r--r-- | fs/hfs/hfs_fs.h | 2 | ||||
-rw-r--r-- | fs/hfs/inode.c | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c index 263d5028d9d1..3f7e9bef9874 100644 --- a/fs/hfs/extent.c +++ b/fs/hfs/extent.c @@ -491,10 +491,10 @@ void hfs_file_truncate(struct inode *inode) /* XXX: Can use generic_cont_expand? */ size = inode->i_size - 1; - res = pagecache_write_begin(NULL, mapping, size+1, 0, 0, - &page, &fsdata); + res = hfs_write_begin(NULL, mapping, size + 1, 0, &page, + &fsdata); if (!res) { - res = pagecache_write_end(NULL, mapping, size+1, 0, 0, + res = generic_write_end(NULL, mapping, size + 1, 0, 0, page, fsdata); } if (res) diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index b8eb0322a3e5..68d0305880f7 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -201,6 +201,8 @@ extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int); extern const struct address_space_operations hfs_aops; extern const struct address_space_operations hfs_btree_aops; +int hfs_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, struct page **pagep, void **fsdata); extern struct inode *hfs_new_inode(struct inode *, const struct qstr *, umode_t); extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *); extern int hfs_write_inode(struct inode *, struct writeback_control *); diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 93d9aa832139..9a26b9510da0 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -49,9 +49,8 @@ static void hfs_write_failed(struct address_space *mapping, loff_t to) } } -static int hfs_write_begin(struct file *file, struct address_space *mapping, - loff_t pos, unsigned len, - struct page **pagep, void **fsdata) +int hfs_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, struct page **pagep, void **fsdata) { int ret; |