new helper: iterate_supers()
[safe/jmp/linux-2.6] / fs / sysv / itree.c
index 86f5f8d..f042eec 100644 (file)
@@ -453,23 +453,38 @@ static int sysv_writepage(struct page *page, struct writeback_control *wbc)
 {
        return block_write_full_page(page,get_block,wbc);
 }
+
 static int sysv_readpage(struct file *file, struct page *page)
 {
        return block_read_full_page(page,get_block);
 }
-static int sysv_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
+
+int __sysv_write_begin(struct file *file, struct address_space *mapping,
+                       loff_t pos, unsigned len, unsigned flags,
+                       struct page **pagep, void **fsdata)
 {
-       return block_prepare_write(page,from,to,get_block);
+       return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
+                               get_block);
 }
+
+static int sysv_write_begin(struct file *file, struct address_space *mapping,
+                       loff_t pos, unsigned len, unsigned flags,
+                       struct page **pagep, void **fsdata)
+{
+       *pagep = NULL;
+       return __sysv_write_begin(file, mapping, pos, len, flags, pagep, fsdata);
+}
+
 static sector_t sysv_bmap(struct address_space *mapping, sector_t block)
 {
        return generic_block_bmap(mapping,block,get_block);
 }
-struct address_space_operations sysv_aops = {
+
+const struct address_space_operations sysv_aops = {
        .readpage = sysv_readpage,
        .writepage = sysv_writepage,
        .sync_page = block_sync_page,
-       .prepare_write = sysv_prepare_write,
-       .commit_write = generic_commit_write,
+       .write_begin = sysv_write_begin,
+       .write_end = generic_write_end,
        .bmap = sysv_bmap
 };