From 0aeb304d2a05e5a79b6ac93650fbb2ecf215db71 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 8 Dec 2011 21:13:46 +0100 Subject: [PATCH] --- yaml --- r: 281449 b: refs/heads/master c: 1415dd8705394399d59a3df1ab48d149e1e41e77 h: refs/heads/master i: 281447: 2770359be26653019957095a3b788ef786a93e76 v: v3 --- [refs] | 2 +- trunk/fs/ext3/ialloc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 77cff89ec70c..d9b97366feef 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d03e1292c46721f60830c5d2e334966472002ed0 +refs/heads/master: 1415dd8705394399d59a3df1ab48d149e1e41e77 diff --git a/trunk/fs/ext3/ialloc.c b/trunk/fs/ext3/ialloc.c index 5c866e06e7ab..adae962ee957 100644 --- a/trunk/fs/ext3/ialloc.c +++ b/trunk/fs/ext3/ialloc.c @@ -525,8 +525,12 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, 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++;