]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/hfs/inode.c
[ARM] 4421/1: AT91: Value of _KEY fields.
[linux-2.6-omap-h63xx.git] / fs / hfs / inode.c
index 2d4ced22201ba18d3b8e81eb5b1860d63011897b..9a934db0bd8ae927509a9c168ff1ee07cc167562 100644 (file)
 
 #include <linux/pagemap.h>
 #include <linux/mpage.h>
+#include <linux/sched.h>
 
 #include "hfs_fs.h"
 #include "btree.h"
 
 static const struct file_operations hfs_file_operations;
-static struct inode_operations hfs_file_inode_operations;
+static const struct inode_operations hfs_file_inode_operations;
 
 /*================ Variable-like macros ================*/
 
@@ -102,7 +103,7 @@ static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb,
                const struct iovec *iov, loff_t offset, unsigned long nr_segs)
 {
        struct file *file = iocb->ki_filp;
-       struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+       struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host;
 
        return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
                                  offset, nr_segs, hfs_get_block, NULL);
@@ -114,7 +115,7 @@ static int hfs_writepages(struct address_space *mapping,
        return mpage_writepages(mapping, wbc, hfs_get_block);
 }
 
-struct address_space_operations hfs_btree_aops = {
+const struct address_space_operations hfs_btree_aops = {
        .readpage       = hfs_readpage,
        .writepage      = hfs_writepage,
        .sync_page      = block_sync_page,
@@ -124,7 +125,7 @@ struct address_space_operations hfs_btree_aops = {
        .releasepage    = hfs_releasepage,
 };
 
-struct address_space_operations hfs_aops = {
+const struct address_space_operations hfs_aops = {
        .readpage       = hfs_readpage,
        .writepage      = hfs_writepage,
        .sync_page      = block_sync_page,
@@ -154,7 +155,6 @@ struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, int mode)
        inode->i_gid = current->fsgid;
        inode->i_nlink = 1;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-       inode->i_blksize = HFS_SB(sb)->alloc_blksz;
        HFS_I(inode)->flags = 0;
        HFS_I(inode)->rsrc_inode = NULL;
        HFS_I(inode)->fs_blocks = 0;
@@ -284,7 +284,6 @@ static int hfs_read_inode(struct inode *inode, void *data)
        inode->i_uid = hsb->s_uid;
        inode->i_gid = hsb->s_gid;
        inode->i_nlink = 1;
-       inode->i_blksize = HFS_SB(inode->i_sb)->alloc_blksz;
 
        if (idata->key)
                HFS_I(inode)->cat_key = *idata->key;
@@ -603,8 +602,10 @@ int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr)
 
 static const struct file_operations hfs_file_operations = {
        .llseek         = generic_file_llseek,
-       .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,
        .mmap           = generic_file_mmap,
        .sendfile       = generic_file_sendfile,
        .fsync          = file_fsync,
@@ -612,7 +613,7 @@ static const struct file_operations hfs_file_operations = {
        .release        = hfs_file_release,
 };
 
-static struct inode_operations hfs_file_inode_operations = {
+static const struct inode_operations hfs_file_inode_operations = {
        .lookup         = hfs_file_lookup,
        .truncate       = hfs_file_truncate,
        .setattr        = hfs_inode_setattr,