diff options
Diffstat (limited to 'fs/ext2/ialloc.c')
-rw-r--r-- | fs/ext2/ialloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index c4e81dfb74ba..8b15cf8cef37 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c @@ -429,7 +429,7 @@ found: return group; } -struct inode *ext2_new_inode(struct inode *dir, int mode, +struct inode *ext2_new_inode(struct inode *dir, umode_t mode, const struct qstr *qstr) { struct super_block *sb; @@ -573,8 +573,11 @@ got: inode->i_generation = sbi->s_next_generation++; spin_unlock(&sbi->s_next_gen_lock); if (insert_inode_locked(inode) < 0) { - err = -EINVAL; - goto fail_drop; + ext2_error(sb, "ext2_new_inode", + "inode number already in use - inode=%lu", + (unsigned long) ino); + err = -EIO; + goto fail; } dquot_initialize(inode); |