aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index b8a2990bab83..384fc0d1dd74 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -254,13 +254,13 @@ no_block:
254 * Caller must make sure that @ind is valid and will stay that way. 254 * Caller must make sure that @ind is valid and will stay that way.
255 */ 255 */
256 256
257static unsigned long ext2_find_near(struct inode *inode, Indirect *ind) 257static ext2_fsblk_t ext2_find_near(struct inode *inode, Indirect *ind)
258{ 258{
259 struct ext2_inode_info *ei = EXT2_I(inode); 259 struct ext2_inode_info *ei = EXT2_I(inode);
260 __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data; 260 __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data;
261 __le32 *p; 261 __le32 *p;
262 unsigned long bg_start; 262 ext2_fsblk_t bg_start;
263 unsigned long colour; 263 ext2_fsblk_t colour;
264 264
265 /* Try to find previous block */ 265 /* Try to find previous block */
266 for (p = ind->p - 1; p >= start; p--) 266 for (p = ind->p - 1; p >= start; p--)
@@ -275,8 +275,7 @@ static unsigned long ext2_find_near(struct inode *inode, Indirect *ind)
275 * It is going to be refered from inode itself? OK, just put it into 275 * It is going to be refered from inode itself? OK, just put it into
276 * the same cylinder group then. 276 * the same cylinder group then.
277 */ 277 */
278 bg_start = (ei->i_block_group * EXT2_BLOCKS_PER_GROUP(inode->i_sb)) + 278 bg_start = ext2_group_first_block_no(inode->i_sb, ei->i_block_group);
279 le32_to_cpu(EXT2_SB(inode->i_sb)->s_es->s_first_data_block);
280 colour = (current->pid % 16) * 279 colour = (current->pid % 16) *
281 (EXT2_BLOCKS_PER_GROUP(inode->i_sb) / 16); 280 (EXT2_BLOCKS_PER_GROUP(inode->i_sb) / 16);
282 return bg_start + colour; 281 return bg_start + colour;
@@ -291,8 +290,8 @@ static unsigned long ext2_find_near(struct inode *inode, Indirect *ind)
291 * Returns preferred place for a block (the goal). 290 * Returns preferred place for a block (the goal).
292 */ 291 */
293 292
294static inline int ext2_find_goal(struct inode *inode, long block, 293static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block,
295 Indirect *partial) 294 Indirect *partial)
296{ 295{
297 struct ext2_block_alloc_info *block_i; 296 struct ext2_block_alloc_info *block_i;
298 297
@@ -796,7 +795,7 @@ const struct address_space_operations ext2_aops = {
796 795
797const struct address_space_operations ext2_aops_xip = { 796const struct address_space_operations ext2_aops_xip = {
798 .bmap = ext2_bmap, 797 .bmap = ext2_bmap,
799 .get_xip_page = ext2_get_xip_page, 798 .get_xip_mem = ext2_get_xip_mem,
800}; 799};
801 800
802const struct address_space_operations ext2_nobh_aops = { 801const struct address_space_operations ext2_nobh_aops = {