aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/ialloc.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 09:36:37 -0500
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 09:36:37 -0500
commit2fc2991175bf77395e6b15fe6b2304d3bf72da40 (patch)
treeb0ff38c09240e7c00e1577d447ebe89143d752dc /fs/ext3/ialloc.c
parent8b491d750885ebe8e7d385ce4186c85957d67123 (diff)
parent7015faa7df829876a0f931cd18aa6d7c24a1b581 (diff)
Merge branch 'master' of /home/tglx/work/mtd/git/linux-2.6.git/
Diffstat (limited to 'fs/ext3/ialloc.c')
-rw-r--r--fs/ext3/ialloc.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 6981bd014ede..df3f517c54ac 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -26,6 +26,7 @@
26 26
27#include <asm/byteorder.h> 27#include <asm/byteorder.h>
28 28
29#include "bitmap.h"
29#include "xattr.h" 30#include "xattr.h"
30#include "acl.h" 31#include "acl.h"
31 32
@@ -597,22 +598,22 @@ got:
597 598
598 ret = inode; 599 ret = inode;
599 if(DQUOT_ALLOC_INODE(inode)) { 600 if(DQUOT_ALLOC_INODE(inode)) {
600 DQUOT_DROP(inode);
601 err = -EDQUOT; 601 err = -EDQUOT;
602 goto fail2; 602 goto fail_drop;
603 } 603 }
604
604 err = ext3_init_acl(handle, inode, dir); 605 err = ext3_init_acl(handle, inode, dir);
605 if (err) { 606 if (err)
606 DQUOT_FREE_INODE(inode); 607 goto fail_free_drop;
607 DQUOT_DROP(inode); 608
608 goto fail2; 609 err = ext3_init_security(handle,inode, dir);
609 } 610 if (err)
611 goto fail_free_drop;
612
610 err = ext3_mark_inode_dirty(handle, inode); 613 err = ext3_mark_inode_dirty(handle, inode);
611 if (err) { 614 if (err) {
612 ext3_std_error(sb, err); 615 ext3_std_error(sb, err);
613 DQUOT_FREE_INODE(inode); 616 goto fail_free_drop;
614 DQUOT_DROP(inode);
615 goto fail2;
616 } 617 }
617 618
618 ext3_debug("allocating inode %lu\n", inode->i_ino); 619 ext3_debug("allocating inode %lu\n", inode->i_ino);
@@ -626,7 +627,11 @@ really_out:
626 brelse(bitmap_bh); 627 brelse(bitmap_bh);
627 return ret; 628 return ret;
628 629
629fail2: 630fail_free_drop:
631 DQUOT_FREE_INODE(inode);
632
633fail_drop:
634 DQUOT_DROP(inode);
630 inode->i_flags |= S_NOQUOTA; 635 inode->i_flags |= S_NOQUOTA;
631 inode->i_nlink = 0; 636 inode->i_nlink = 0;
632 iput(inode); 637 iput(inode);
@@ -700,7 +705,6 @@ unsigned long ext3_count_free_inodes (struct super_block * sb)
700 unsigned long bitmap_count, x; 705 unsigned long bitmap_count, x;
701 struct buffer_head *bitmap_bh = NULL; 706 struct buffer_head *bitmap_bh = NULL;
702 707
703 lock_super (sb);
704 es = EXT3_SB(sb)->s_es; 708 es = EXT3_SB(sb)->s_es;
705 desc_count = 0; 709 desc_count = 0;
706 bitmap_count = 0; 710 bitmap_count = 0;
@@ -723,7 +727,6 @@ unsigned long ext3_count_free_inodes (struct super_block * sb)
723 brelse(bitmap_bh); 727 brelse(bitmap_bh);
724 printk("ext3_count_free_inodes: stored = %u, computed = %lu, %lu\n", 728 printk("ext3_count_free_inodes: stored = %u, computed = %lu, %lu\n",
725 le32_to_cpu(es->s_free_inodes_count), desc_count, bitmap_count); 729 le32_to_cpu(es->s_free_inodes_count), desc_count, bitmap_count);
726 unlock_super(sb);
727 return desc_count; 730 return desc_count;
728#else 731#else
729 desc_count = 0; 732 desc_count = 0;