ext4: Don't leave behind a half-created inode if ext4_mkdir() fails
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 22 Feb 2008 11:17:31 +0000 (06:17 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 22 Feb 2008 11:17:31 +0000 (06:17 -0500)
commit4cdeed861b5f797b3fa661eb331a6bd6ad669c6a
tree6ef2159a06974e28bdff4426525ecdd052d7b57f
parentb73fce69ecb091a178ef9286027c370a63eb25aa
ext4: Don't leave behind a half-created inode if ext4_mkdir() fails

If ext4_mkdir() fails to allocate the initial block for the directory,
don't leave behind a half-created directory inode with the link count
left at one.  This was caused by an inappropriate call to ext4_dec_count().

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/namei.c