Merge branch 'linus' into percpu-cpumask-x86-for-linus-2
[linux-2.6-microblaze.git] / fs / reiserfs / inode.c
index ed04f47..823227a 100644 (file)
@@ -53,7 +53,7 @@ void reiserfs_delete_inode(struct inode *inode)
                 * after delete_object so that quota updates go into the same transaction as
                 * stat data deletion */
                if (!err) 
-                       DQUOT_FREE_INODE(inode);
+                       vfs_dq_free_inode(inode);
 
                if (journal_end(&th, inode->i_sb, jbegin_count))
                        goto out;
@@ -1763,7 +1763,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
 
        BUG_ON(!th->t_trans_id);
 
-       if (DQUOT_ALLOC_INODE(inode)) {
+       if (vfs_dq_alloc_inode(inode)) {
                err = -EDQUOT;
                goto out_end_trans;
        }
@@ -1782,6 +1782,12 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
                goto out_bad_inode;
        }
        args.objectid = inode->i_ino = le32_to_cpu(ih.ih_key.k_objectid);
+       if (old_format_only(sb))
+               make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET,
+                                 TYPE_STAT_DATA, SD_V1_SIZE, MAX_US_INT);
+       else
+               make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET,
+                                 TYPE_STAT_DATA, SD_SIZE, MAX_US_INT);
        memcpy(INODE_PKEY(inode), &(ih.ih_key), KEY_SIZE);
        args.dirid = le32_to_cpu(ih.ih_key.k_dir_id);
        if (insert_inode_locked4(inode, args.objectid,
@@ -1834,13 +1840,6 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
        reiserfs_init_acl_default(inode);
        reiserfs_init_xattr_rwsem(inode);
 
-       if (old_format_only(sb))
-               make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET,
-                                 TYPE_STAT_DATA, SD_V1_SIZE, MAX_US_INT);
-       else
-               make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET,
-                                 TYPE_STAT_DATA, SD_SIZE, MAX_US_INT);
-
        /* key to search for correct place for new stat data */
        _make_cpu_key(&key, KEY_FORMAT_3_6, le32_to_cpu(ih.ih_key.k_dir_id),
                      le32_to_cpu(ih.ih_key.k_objectid), SD_OFFSET,
@@ -1948,12 +1947,12 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
        INODE_PKEY(inode)->k_objectid = 0;
 
        /* Quota change must be inside a transaction for journaling */
-       DQUOT_FREE_INODE(inode);
+       vfs_dq_free_inode(inode);
 
       out_end_trans:
        journal_end(th, th->t_super, th->t_blocks_allocated);
        /* Drop can be outside and it needs more credits so it's better to have it outside */
-       DQUOT_DROP(inode);
+       vfs_dq_drop(inode);
        inode->i_flags |= S_NOQUOTA;
        make_bad_inode(inode);
 
@@ -3120,7 +3119,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
                                if (error)
                                        goto out;
                                error =
-                                   DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
+                                   vfs_dq_transfer(inode, attr) ? -EDQUOT : 0;
                                if (error) {
                                        journal_end(&th, inode->i_sb,
                                                    jbegin_count);