aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-10-16 04:25:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:57 -0400
commitbe021ee41a8b65d181fe22799de6be62adf72efb (patch)
treed02e79ac30c6b03ea361bc425a566a402a8db0c0 /fs/udf/inode.c
parent82b9d1d0da8046088b0f505f92a97d12d9804613 (diff)
udf: convert to new aops
Convert udf to new aops. Also seem to have fixed pagecache corruption in udf_adinicb_commit_write -- page was marked uptodate when it is not. Also, fixed the silly setup where prepare_write was doing a kmap to be used in commit_write: just do kmap_atomic in write_end. Use libfs helpers to make this easier. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: <bfennema@falcon.csc.calpoly.edu> Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 1652b2c665bb..6ff8151984cf 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -133,10 +133,13 @@ static int udf_readpage(struct file *file, struct page *page)
133 return block_read_full_page(page, udf_get_block); 133 return block_read_full_page(page, udf_get_block);
134} 134}
135 135
136static int udf_prepare_write(struct file *file, struct page *page, 136static int udf_write_begin(struct file *file, struct address_space *mapping,
137 unsigned from, unsigned to) 137 loff_t pos, unsigned len, unsigned flags,
138 struct page **pagep, void **fsdata)
138{ 139{
139 return block_prepare_write(page, from, to, udf_get_block); 140 *pagep = NULL;
141 return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
142 udf_get_block);
140} 143}
141 144
142static sector_t udf_bmap(struct address_space *mapping, sector_t block) 145static sector_t udf_bmap(struct address_space *mapping, sector_t block)
@@ -148,8 +151,8 @@ const struct address_space_operations udf_aops = {
148 .readpage = udf_readpage, 151 .readpage = udf_readpage,
149 .writepage = udf_writepage, 152 .writepage = udf_writepage,
150 .sync_page = block_sync_page, 153 .sync_page = block_sync_page,
151 .prepare_write = udf_prepare_write, 154 .write_begin = udf_write_begin,
152 .commit_write = generic_commit_write, 155 .write_end = generic_write_end,
153 .bmap = udf_bmap, 156 .bmap = udf_bmap,
154}; 157};
155 158