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.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 96552769d039..6549945f9ac1 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -597,27 +597,22 @@ got:
597 597
598 ret = inode; 598 ret = inode;
599 if(DQUOT_ALLOC_INODE(inode)) { 599 if(DQUOT_ALLOC_INODE(inode)) {
600 DQUOT_DROP(inode);
601 err = -EDQUOT; 600 err = -EDQUOT;
602 goto fail2; 601 goto fail_drop;
603 } 602 }
603
604 err = ext3_init_acl(handle, inode, dir); 604 err = ext3_init_acl(handle, inode, dir);
605 if (err) { 605 if (err)
606 DQUOT_FREE_INODE(inode); 606 goto fail_free_drop;
607 DQUOT_DROP(inode); 607
608 goto fail2;
609 }
610 err = ext3_init_security(handle,inode, dir); 608 err = ext3_init_security(handle,inode, dir);
611 if (err) { 609 if (err)
612 DQUOT_FREE_INODE(inode); 610 goto fail_free_drop;
613 goto fail2; 611
614 }
615 err = ext3_mark_inode_dirty(handle, inode); 612 err = ext3_mark_inode_dirty(handle, inode);
616 if (err) { 613 if (err) {
617 ext3_std_error(sb, err); 614 ext3_std_error(sb, err);
618 DQUOT_FREE_INODE(inode); 615 goto fail_free_drop;
619 DQUOT_DROP(inode);
620 goto fail2;
621 } 616 }
622 617
623 ext3_debug("allocating inode %lu\n", inode->i_ino); 618 ext3_debug("allocating inode %lu\n", inode->i_ino);
@@ -631,7 +626,11 @@ really_out:
631 brelse(bitmap_bh); 626 brelse(bitmap_bh);
632 return ret; 627 return ret;
633 628
634fail2: 629fail_free_drop:
630 DQUOT_FREE_INODE(inode);
631
632fail_drop:
633 DQUOT_DROP(inode);
635 inode->i_flags |= S_NOQUOTA; 634 inode->i_flags |= S_NOQUOTA;
636 inode->i_nlink = 0; 635 inode->i_nlink = 0;
637 iput(inode); 636 iput(inode);