]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ext4/migrate.c
ext4: quota macros cleanup
[net-next-2.6.git] / fs / ext4 / migrate.c
index d641e13e740ef9afb3a59a6470c1c274a26cb2b3..81415814b00b06a0455402078cd41588a615a701 100644 (file)
@@ -238,7 +238,7 @@ static int extend_credit_for_blkdel(handle_t *handle, struct inode *inode)
         * So allocate a credit of 3. We may update
         * quota (user and group).
         */
-       needed = 3 + 2*EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);
+       needed = 3 + EXT4_MAXQUOTAS_TRANS_BLOCKS(inode->i_sb);
 
        if (ext4_journal_extend(handle, needed) != 0)
                retval = ext4_journal_restart(handle, needed);
@@ -486,7 +486,7 @@ int ext4_ext_migrate(struct inode *inode)
        handle = ext4_journal_start(inode,
                                        EXT4_DATA_TRANS_BLOCKS(inode->i_sb) +
                                        EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 +
-                                       2 * EXT4_QUOTA_INIT_BLOCKS(inode->i_sb)
+                                       EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)
                                        + 1);
        if (IS_ERR(handle)) {
                retval = PTR_ERR(handle);