]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/jffs2/file.c
Pull remove-hotkey into release branch
[linux-beck.git] / fs / jffs2 / file.c
index e18c9437d58f078a54589a1b41bc10850d4c1781..e82eeaf7590d59891ae21560307d461786b02e9f 100644 (file)
@@ -42,8 +42,10 @@ const struct file_operations jffs2_file_operations =
 {
        .llseek =       generic_file_llseek,
        .open =         generic_file_open,
-       .read =         generic_file_read,
-       .write =        generic_file_write,
+       .read =         do_sync_read,
+       .aio_read =     generic_file_aio_read,
+       .write =        do_sync_write,
+       .aio_write =    generic_file_aio_write,
        .ioctl =        jffs2_ioctl,
        .mmap =         generic_file_readonly_mmap,
        .fsync =        jffs2_fsync,
@@ -52,7 +54,7 @@ const struct file_operations jffs2_file_operations =
 
 /* jffs2_file_inode_operations */
 
-struct inode_operations jffs2_file_inode_operations =
+const struct inode_operations jffs2_file_inode_operations =
 {
        .permission =   jffs2_permission,
        .setattr =      jffs2_setattr,
@@ -62,7 +64,7 @@ struct inode_operations jffs2_file_inode_operations =
        .removexattr =  jffs2_removexattr
 };
 
-struct address_space_operations jffs2_file_address_operations =
+const struct address_space_operations jffs2_file_address_operations =
 {
        .readpage =     jffs2_readpage,
        .prepare_write =jffs2_prepare_write,
@@ -134,13 +136,13 @@ static int jffs2_prepare_write (struct file *filp, struct page *pg,
                struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
                struct jffs2_raw_inode ri;
                struct jffs2_full_dnode *fn;
-               uint32_t phys_ofs, alloc_len;
+               uint32_t alloc_len;
 
                D1(printk(KERN_DEBUG "Writing new hole frag 0x%x-0x%x between current EOF and new page\n",
                          (unsigned int)inode->i_size, pageofs));
 
-               ret = jffs2_reserve_space(c, sizeof(ri), &phys_ofs, &alloc_len,
-                                       ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
+               ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
+                                         ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
                if (ret)
                        return ret;
 
@@ -166,7 +168,7 @@ static int jffs2_prepare_write (struct file *filp, struct page *pg,
                ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8));
                ri.data_crc = cpu_to_je32(0);
 
-               fn = jffs2_write_dnode(c, f, &ri, NULL, 0, phys_ofs, ALLOC_NORMAL);
+               fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_NORMAL);
 
                if (IS_ERR(fn)) {
                        ret = PTR_ERR(fn);