]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/qnx4/inode.c
[ARM] 4602/3: AT91: debugfs interface to view GPIO pin state
[linux-2.6-omap-h63xx.git] / fs / qnx4 / inode.c
index 75fc8498f2e29894336a3acd07e14af06c30cdcc..638bdb963213bd70e2b0dab87f71cec1ce3d7f9f 100644 (file)
@@ -433,16 +433,21 @@ static int qnx4_writepage(struct page *page, struct writeback_control *wbc)
 {
        return block_write_full_page(page,qnx4_get_block, wbc);
 }
+
 static int qnx4_readpage(struct file *file, struct page *page)
 {
        return block_read_full_page(page,qnx4_get_block);
 }
-static int qnx4_prepare_write(struct file *file, struct page *page,
-                             unsigned from, unsigned to)
+
+static int qnx4_write_begin(struct file *file, struct address_space *mapping,
+                       loff_t pos, unsigned len, unsigned flags,
+                       struct page **pagep, void **fsdata)
 {
-       struct qnx4_inode_info *qnx4_inode = qnx4_i(page->mapping->host);
-       return cont_prepare_write(page, from, to, qnx4_get_block,
-                                 &qnx4_inode->mmu_private);
+       struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host);
+       *pagep = NULL;
+       return cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
+                               qnx4_get_block,
+                               &qnx4_inode->mmu_private);
 }
 static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
 {
@@ -452,8 +457,8 @@ static const struct address_space_operations qnx4_aops = {
        .readpage       = qnx4_readpage,
        .writepage      = qnx4_writepage,
        .sync_page      = block_sync_page,
-       .prepare_write  = qnx4_prepare_write,
-       .commit_write   = generic_commit_write,
+       .write_begin    = qnx4_write_begin,
+       .write_end      = generic_write_end,
        .bmap           = qnx4_bmap
 };
 
@@ -531,13 +536,11 @@ static void qnx4_destroy_inode(struct inode *inode)
        kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache * cachep,
-                     unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo;
 
-       if (flags & SLAB_CTOR_CONSTRUCTOR)
-               inode_init_once(&ei->vfs_inode);
+       inode_init_once(&ei->vfs_inode);
 }
 
 static int init_inodecache(void)
@@ -546,7 +549,7 @@ static int init_inodecache(void)
                                             sizeof(struct qnx4_inode_info),
                                             0, (SLAB_RECLAIM_ACCOUNT|
                                                SLAB_MEM_SPREAD),
-                                            init_once, NULL);
+                                            init_once);
        if (qnx4_inode_cachep == NULL)
                return -ENOMEM;
        return 0;