aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/aops.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-10-16 04:25:24 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:58 -0400
commitb6af1bcd8720cb3062c8c4d4c8ba02bee10ff03f (patch)
treee6cb27498f649dd3addc48fb4d92ac20ae8de7cb /fs/ocfs2/aops.c
parentf2b6a16eb8f5b4851b01625a21e0c71207c2ce77 (diff)
ocfs2: convert to new aops
Plug ocfs2 into the ->write_begin and ->write_end aops. A bunch of custom code is now gone - the iovec iteration stuff during write and the ocfs2 splice write actor. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r--fs/ocfs2/aops.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 34d10452c56d..c69c1b300155 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1724,9 +1724,9 @@ out:
1724 return ret; 1724 return ret;
1725} 1725}
1726 1726
1727int ocfs2_write_begin(struct file *file, struct address_space *mapping, 1727static int ocfs2_write_begin(struct file *file, struct address_space *mapping,
1728 loff_t pos, unsigned len, unsigned flags, 1728 loff_t pos, unsigned len, unsigned flags,
1729 struct page **pagep, void **fsdata) 1729 struct page **pagep, void **fsdata)
1730{ 1730{
1731 int ret; 1731 int ret;
1732 struct buffer_head *di_bh = NULL; 1732 struct buffer_head *di_bh = NULL;
@@ -1877,9 +1877,9 @@ out_write_size:
1877 return copied; 1877 return copied;
1878} 1878}
1879 1879
1880int ocfs2_write_end(struct file *file, struct address_space *mapping, 1880static int ocfs2_write_end(struct file *file, struct address_space *mapping,
1881 loff_t pos, unsigned len, unsigned copied, 1881 loff_t pos, unsigned len, unsigned copied,
1882 struct page *page, void *fsdata) 1882 struct page *page, void *fsdata)
1883{ 1883{
1884 int ret; 1884 int ret;
1885 struct inode *inode = mapping->host; 1885 struct inode *inode = mapping->host;
@@ -1896,6 +1896,8 @@ int ocfs2_write_end(struct file *file, struct address_space *mapping,
1896const struct address_space_operations ocfs2_aops = { 1896const struct address_space_operations ocfs2_aops = {
1897 .readpage = ocfs2_readpage, 1897 .readpage = ocfs2_readpage,
1898 .writepage = ocfs2_writepage, 1898 .writepage = ocfs2_writepage,
1899 .write_begin = ocfs2_write_begin,
1900 .write_end = ocfs2_write_end,
1899 .bmap = ocfs2_bmap, 1901 .bmap = ocfs2_bmap,
1900 .sync_page = block_sync_page, 1902 .sync_page = block_sync_page,
1901 .direct_IO = ocfs2_direct_IO, 1903 .direct_IO = ocfs2_direct_IO,