From d92a4881ca8b674d547df7a32d73477f58fc581c Mon Sep 17 00:00:00 2001 From: Chris Sykes Date: Tue, 27 Sep 2005 21:45:22 -0700 Subject: [PATCH] --- yaml --- r: 9380 b: refs/heads/master c: 9ed6c2fb34a1fb493caec8a9644d05bb880a6923 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext2/ialloc.c | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index a4822f7fb401..6d8e0125d62b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ee4e52719ce474af339f4b81ece2ce9ecf920dfd +refs/heads/master: 9ed6c2fb34a1fb493caec8a9644d05bb880a6923 diff --git a/trunk/fs/ext2/ialloc.c b/trunk/fs/ext2/ialloc.c index c8d07030c897..e2d6208633a7 100644 --- a/trunk/fs/ext2/ialloc.c +++ b/trunk/fs/ext2/ialloc.c @@ -605,27 +605,28 @@ struct inode *ext2_new_inode(struct inode *dir, int mode) insert_inode_hash(inode); if (DQUOT_ALLOC_INODE(inode)) { - DQUOT_DROP(inode); err = -ENOSPC; - goto fail2; + goto fail_drop; } + err = ext2_init_acl(inode, dir); - if (err) { - DQUOT_FREE_INODE(inode); - DQUOT_DROP(inode); - goto fail2; - } + if (err) + goto fail_free_drop; + err = ext2_init_security(inode,dir); - if (err) { - DQUOT_FREE_INODE(inode); - goto fail2; - } + if (err) + goto fail_free_drop; + mark_inode_dirty(inode); ext2_debug("allocating inode %lu\n", inode->i_ino); ext2_preread_inode(inode); return inode; -fail2: +fail_free_drop: + DQUOT_FREE_INODE(inode); + +fail_drop: + DQUOT_DROP(inode); inode->i_flags |= S_NOQUOTA; inode->i_nlink = 0; iput(inode);