more file_inode() open-coded instances
[deliverable/linux.git] / fs / ext4 / indirect.c
index bdd20231e66c51cbe2eafc0624c7c58eff51fb79..b505a145a5937a426184d5c289b6825ee62d0e17 100644 (file)
@@ -358,9 +358,8 @@ static int ext4_alloc_blocks(handle_t *handle, struct inode *inode,
                         * for the first direct block
                         */
                        new_blocks[index] = current_block;
-                       printk(KERN_INFO "%s returned more blocks than "
+                       WARN(1, KERN_INFO "%s returned more blocks than "
                                                "requested\n", __func__);
-                       WARN_ON(1);
                        break;
                }
        }
@@ -792,7 +791,7 @@ ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
 
                if (final_size > inode->i_size) {
                        /* Credits for sb + inode write */
-                       handle = ext4_journal_start(inode, 2);
+                       handle = ext4_journal_start(inode, EXT4_HT_INODE, 2);
                        if (IS_ERR(handle)) {
                                ret = PTR_ERR(handle);
                                goto out;
@@ -852,7 +851,7 @@ locked:
                int err;
 
                /* Credits for sb + inode write */
-               handle = ext4_journal_start(inode, 2);
+               handle = ext4_journal_start(inode, EXT4_HT_INODE, 2);
                if (IS_ERR(handle)) {
                        /* This is really bad luck. We've written the data
                         * but cannot extend i_size. Bail out and pretend
@@ -951,7 +950,8 @@ static handle_t *start_transaction(struct inode *inode)
 {
        handle_t *result;
 
-       result = ext4_journal_start(inode, ext4_blocks_for_truncate(inode));
+       result = ext4_journal_start(inode, EXT4_HT_TRUNCATE,
+                                   ext4_blocks_for_truncate(inode));
        if (!IS_ERR(result))
                return result;
 
@@ -1606,7 +1606,7 @@ err:
 
 int ext4_ind_punch_hole(struct file *file, loff_t offset, loff_t length)
 {
-       struct inode *inode = file->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(file);
        struct super_block *sb = inode->i_sb;
        ext4_lblk_t first_block, stop_block;
        struct address_space *mapping = inode->i_mapping;
This page took 0.02855 seconds and 5 git commands to generate.