[PATCH] x86_64: Get rid of pud_offset_k / __pud_offset_k
[pandora-kernel.git] / fs / ext2 / ialloc.c
index 74714af..308c252 100644 (file)
@@ -605,7 +605,7 @@ got:
        insert_inode_hash(inode);
 
        if (DQUOT_ALLOC_INODE(inode)) {
-               err = -ENOSPC;
+               err = -EDQUOT;
                goto fail_drop;
        }
 
@@ -638,6 +638,7 @@ fail:
        return ERR_PTR(err);
 }
 
+/* Superblock must be locked */
 unsigned long ext2_count_free_inodes (struct super_block * sb)
 {
        struct ext2_group_desc *desc;
@@ -649,7 +650,6 @@ unsigned long ext2_count_free_inodes (struct super_block * sb)
        unsigned long bitmap_count = 0;
        struct buffer_head *bitmap_bh = NULL;
 
-       lock_super (sb);
        es = EXT2_SB(sb)->s_es;
        for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {
                unsigned x;
@@ -672,7 +672,6 @@ unsigned long ext2_count_free_inodes (struct super_block * sb)
        printk("ext2_count_free_inodes: stored = %lu, computed = %lu, %lu\n",
                percpu_counter_read(&EXT2_SB(sb)->s_freeinodes_counter),
                desc_count, bitmap_count);
-       unlock_super(sb);
        return desc_count;
 #else
        for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {