diff options
Diffstat (limited to 'fs/hfs/inode.c')
-rw-r--r-- | fs/hfs/inode.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 39fd85b9b916..2d4ced22201b 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include "hfs_fs.h" | 17 | #include "hfs_fs.h" |
18 | #include "btree.h" | 18 | #include "btree.h" |
19 | 19 | ||
20 | static struct file_operations hfs_file_operations; | 20 | static const struct file_operations hfs_file_operations; |
21 | static struct inode_operations hfs_file_inode_operations; | 21 | static struct inode_operations hfs_file_inode_operations; |
22 | 22 | ||
23 | /*================ Variable-like macros ================*/ | 23 | /*================ Variable-like macros ================*/ |
@@ -98,17 +98,6 @@ static int hfs_releasepage(struct page *page, gfp_t mask) | |||
98 | return res ? try_to_free_buffers(page) : 0; | 98 | return res ? try_to_free_buffers(page) : 0; |
99 | } | 99 | } |
100 | 100 | ||
101 | static int hfs_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, | ||
102 | struct buffer_head *bh_result, int create) | ||
103 | { | ||
104 | int ret; | ||
105 | |||
106 | ret = hfs_get_block(inode, iblock, bh_result, create); | ||
107 | if (!ret) | ||
108 | bh_result->b_size = (1 << inode->i_blkbits); | ||
109 | return ret; | ||
110 | } | ||
111 | |||
112 | static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb, | 101 | static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb, |
113 | const struct iovec *iov, loff_t offset, unsigned long nr_segs) | 102 | const struct iovec *iov, loff_t offset, unsigned long nr_segs) |
114 | { | 103 | { |
@@ -116,7 +105,7 @@ static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb, | |||
116 | struct inode *inode = file->f_dentry->d_inode->i_mapping->host; | 105 | struct inode *inode = file->f_dentry->d_inode->i_mapping->host; |
117 | 106 | ||
118 | return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, | 107 | return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, |
119 | offset, nr_segs, hfs_get_blocks, NULL); | 108 | offset, nr_segs, hfs_get_block, NULL); |
120 | } | 109 | } |
121 | 110 | ||
122 | static int hfs_writepages(struct address_space *mapping, | 111 | static int hfs_writepages(struct address_space *mapping, |
@@ -612,7 +601,7 @@ int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr) | |||
612 | } | 601 | } |
613 | 602 | ||
614 | 603 | ||
615 | static struct file_operations hfs_file_operations = { | 604 | static const struct file_operations hfs_file_operations = { |
616 | .llseek = generic_file_llseek, | 605 | .llseek = generic_file_llseek, |
617 | .read = generic_file_read, | 606 | .read = generic_file_read, |
618 | .write = generic_file_write, | 607 | .write = generic_file_write, |