]> err.no Git - linux-2.6/blobdiff - fs/ext4/inode.c
Merge branch 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-2.6] / fs / ext4 / inode.c
index c05dc57148bb3ce04ccccda4b5678852a55887e3..810b6d6474bf787d20049c417474010e90aee7df 100644 (file)
@@ -946,7 +946,7 @@ out:
 static int ext4_get_block(struct inode *inode, sector_t iblock,
                        struct buffer_head *bh_result, int create)
 {
-       handle_t *handle = journal_current_handle();
+       handle_t *handle = ext4_journal_current_handle();
        int ret = 0;
        unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;
 
@@ -1651,7 +1651,7 @@ static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
        /*
         * Reacquire the handle: ext4_get_block() can restart the transaction
         */
-       handle = journal_current_handle();
+       handle = ext4_journal_current_handle();
 
 out_stop:
        if (handle) {
@@ -2432,14 +2432,15 @@ static ext4_fsblk_t ext4_get_inode_block(struct super_block *sb,
                return 0;
        }
 
-       gdp = (struct ext4_group_desc *)bh->b_data;
+       gdp = (struct ext4_group_desc *)((__u8 *)bh->b_data +
+               desc * EXT4_DESC_SIZE(sb));
        /*
         * Figure out the offset within the block group inode table
         */
        offset = ((ino - 1) % EXT4_INODES_PER_GROUP(sb)) *
                EXT4_INODE_SIZE(sb);
-       block = ext4_inode_table(gdp + desc) +
-                       (offset >> EXT4_BLOCK_SIZE_BITS(sb));
+       block = ext4_inode_table(sb, gdp) +
+               (offset >> EXT4_BLOCK_SIZE_BITS(sb));
 
        iloc->block_group = block_group;
        iloc->offset = offset & (EXT4_BLOCK_SIZE(sb) - 1);
@@ -2506,7 +2507,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
                                goto make_io;
 
                        bitmap_bh = sb_getblk(inode->i_sb,
-                               ext4_inode_bitmap(desc));
+                               ext4_inode_bitmap(inode->i_sb, desc));
                        if (!bitmap_bh)
                                goto make_io;