diff options
author | Nick Piggin <npiggin@suse.de> | 2007-10-16 04:25:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:55 -0400 |
commit | 800d15a53e7d14fa26495b7b95d3bfe7877dd69d (patch) | |
tree | 09a59e32043f1b601b73ad6105e7634679337884 /fs/hugetlbfs/inode.c | |
parent | 674b892ede247ef4fb8d00918f02e29c32b9bbaf (diff) |
implement simple fs aops
Implement new aops for some of the simpler filesystems.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r-- | fs/hugetlbfs/inode.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 950c2fbb815b..70fbb29fb202 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -189,15 +189,19 @@ static int hugetlbfs_readpage(struct file *file, struct page * page) | |||
189 | return -EINVAL; | 189 | return -EINVAL; |
190 | } | 190 | } |
191 | 191 | ||
192 | static int hugetlbfs_prepare_write(struct file *file, | 192 | static int hugetlbfs_write_begin(struct file *file, |
193 | struct page *page, unsigned offset, unsigned to) | 193 | struct address_space *mapping, |
194 | loff_t pos, unsigned len, unsigned flags, | ||
195 | struct page **pagep, void **fsdata) | ||
194 | { | 196 | { |
195 | return -EINVAL; | 197 | return -EINVAL; |
196 | } | 198 | } |
197 | 199 | ||
198 | static int hugetlbfs_commit_write(struct file *file, | 200 | static int hugetlbfs_write_end(struct file *file, struct address_space *mapping, |
199 | struct page *page, unsigned offset, unsigned to) | 201 | loff_t pos, unsigned len, unsigned copied, |
202 | struct page *page, void *fsdata) | ||
200 | { | 203 | { |
204 | BUG(); | ||
201 | return -EINVAL; | 205 | return -EINVAL; |
202 | } | 206 | } |
203 | 207 | ||
@@ -569,8 +573,8 @@ static void hugetlbfs_destroy_inode(struct inode *inode) | |||
569 | 573 | ||
570 | static const struct address_space_operations hugetlbfs_aops = { | 574 | static const struct address_space_operations hugetlbfs_aops = { |
571 | .readpage = hugetlbfs_readpage, | 575 | .readpage = hugetlbfs_readpage, |
572 | .prepare_write = hugetlbfs_prepare_write, | 576 | .write_begin = hugetlbfs_write_begin, |
573 | .commit_write = hugetlbfs_commit_write, | 577 | .write_end = hugetlbfs_write_end, |
574 | .set_page_dirty = hugetlbfs_set_page_dirty, | 578 | .set_page_dirty = hugetlbfs_set_page_dirty, |
575 | }; | 579 | }; |
576 | 580 | ||