]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext2/ialloc.c
V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
[linux-2.6-omap-h63xx.git] / fs / ext2 / ialloc.c
index 8d0add62587020ab8299e33dd8a6b5ac4edae500..c454d5db28a5aef07d2585d3a672bb5310c3fa4b 100644 (file)
@@ -585,7 +585,10 @@ got:
        spin_lock(&sbi->s_next_gen_lock);
        inode->i_generation = sbi->s_next_generation++;
        spin_unlock(&sbi->s_next_gen_lock);
-       insert_inode_hash(inode);
+       if (insert_inode_locked(inode) < 0) {
+               err = -EINVAL;
+               goto fail_drop;
+       }
 
        if (DQUOT_ALLOC_INODE(inode)) {
                err = -EDQUOT;
@@ -612,6 +615,7 @@ fail_drop:
        DQUOT_DROP(inode);
        inode->i_flags |= S_NOQUOTA;
        inode->i_nlink = 0;
+       unlock_new_inode(inode);
        iput(inode);
        return ERR_PTR(err);