aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/ialloc.c')
-rw-r--r--fs/ext3/ialloc.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index b39991285136..0d0e97ed3ff6 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -123,10 +123,10 @@ void ext3_free_inode (handle_t *handle, struct inode * inode)
123 * Note: we must free any quota before locking the superblock, 123 * Note: we must free any quota before locking the superblock,
124 * as writing the quota to disk may need the lock as well. 124 * as writing the quota to disk may need the lock as well.
125 */ 125 */
126 vfs_dq_init(inode); 126 dquot_initialize(inode);
127 ext3_xattr_delete_inode(handle, inode); 127 ext3_xattr_delete_inode(handle, inode);
128 vfs_dq_free_inode(inode); 128 dquot_free_inode(inode);
129 vfs_dq_drop(inode); 129 dquot_drop(inode);
130 130
131 is_directory = S_ISDIR(inode->i_mode); 131 is_directory = S_ISDIR(inode->i_mode);
132 132
@@ -582,16 +582,18 @@ got:
582 inode->i_generation = sbi->s_next_generation++; 582 inode->i_generation = sbi->s_next_generation++;
583 spin_unlock(&sbi->s_next_gen_lock); 583 spin_unlock(&sbi->s_next_gen_lock);
584 584
585 ei->i_state = EXT3_STATE_NEW; 585 ei->i_state_flags = 0;
586 ext3_set_inode_state(inode, EXT3_STATE_NEW);
587
586 ei->i_extra_isize = 588 ei->i_extra_isize =
587 (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? 589 (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
588 sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; 590 sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
589 591
590 ret = inode; 592 ret = inode;
591 if (vfs_dq_alloc_inode(inode)) { 593 dquot_initialize(inode);
592 err = -EDQUOT; 594 err = dquot_alloc_inode(inode);
595 if (err)
593 goto fail_drop; 596 goto fail_drop;
594 }
595 597
596 err = ext3_init_acl(handle, inode, dir); 598 err = ext3_init_acl(handle, inode, dir);
597 if (err) 599 if (err)
@@ -619,10 +621,10 @@ really_out:
619 return ret; 621 return ret;
620 622
621fail_free_drop: 623fail_free_drop:
622 vfs_dq_free_inode(inode); 624 dquot_free_inode(inode);
623 625
624fail_drop: 626fail_drop:
625 vfs_dq_drop(inode); 627 dquot_drop(inode);
626 inode->i_flags |= S_NOQUOTA; 628 inode->i_flags |= S_NOQUOTA;
627 inode->i_nlink = 0; 629 inode->i_nlink = 0;
628 unlock_new_inode(inode); 630 unlock_new_inode(inode);