]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ext3/ialloc.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland...
[mv-sheeva.git] / fs / ext3 / ialloc.c
index 5c866e06e7ab94cbc12406be7cf6f37e39fdddae..1cde28438014bfaccd9b1e2b27785044d9f26aec 100644 (file)
@@ -371,7 +371,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent)
  * group to find a free inode.
  */
 struct inode *ext3_new_inode(handle_t *handle, struct inode * dir,
-                            const struct qstr *qstr, int mode)
+                            const struct qstr *qstr, umode_t mode)
 {
        struct super_block *sb;
        struct buffer_head *bitmap_bh = NULL;
@@ -525,8 +525,12 @@ got:
        if (IS_DIRSYNC(inode))
                handle->h_sync = 1;
        if (insert_inode_locked(inode) < 0) {
-               err = -EINVAL;
-               goto fail_drop;
+               /*
+                * Likely a bitmap corruption causing inode to be allocated
+                * twice.
+                */
+               err = -EIO;
+               goto fail;
        }
        spin_lock(&sbi->s_next_gen_lock);
        inode->i_generation = sbi->s_next_generation++;