Merge tag 'docs-5.12' of git://git.lwn.net/linux
[linux-2.6-microblaze.git] / fs / ufs / namei.c
index d5f43ba..9ef40f1 100644 (file)
@@ -43,8 +43,7 @@ static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode)
                return 0;
        }
        inode_dec_link_count(inode);
-       unlock_new_inode(inode);
-       iput(inode);
+       discard_new_inode(inode);
        return err;
 }
 
@@ -142,8 +141,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
 
 out_fail:
        inode_dec_link_count(inode);
-       unlock_new_inode(inode);
-       iput(inode);
+       discard_new_inode(inode);
        return err;
 }
 
@@ -198,8 +196,7 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
 out_fail:
        inode_dec_link_count(inode);
        inode_dec_link_count(inode);
-       unlock_new_inode(inode);
-       iput (inode);
+       discard_new_inode(inode);
 out_dir:
        inode_dec_link_count(dir);
        return err;