From e07226eab6a4da0fbc7083b382063fee18a2cfae Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Sun, 18 Dec 2011 17:37:02 -0500 Subject: [PATCH] --- yaml --- r: 282956 b: refs/heads/master c: acd6ad83517639e8f09a8c5525b1dccd81cd2a10 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/ialloc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5baa74c9eec7..787987695be8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5635a62b83c04d05e4eb4575a1c3de51a35bacdc +refs/heads/master: acd6ad83517639e8f09a8c5525b1dccd81cd2a10 diff --git a/trunk/fs/ext4/ialloc.c b/trunk/fs/ext4/ialloc.c index 00beb4f9cc4f..8fb6844f9734 100644 --- a/trunk/fs/ext4/ialloc.c +++ b/trunk/fs/ext4/ialloc.c @@ -885,8 +885,12 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode, if (IS_DIRSYNC(inode)) ext4_handle_sync(handle); 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++;