don't opencode iget_failed()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 5 Dec 2015 23:23:48 +0000 (18:23 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Dec 2015 02:18:04 +0000 (21:18 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/staging/lustre/lustre/llite/namei.c
fs/ecryptfs/inode.c

index 2ca22001a534d87759e644151da517368338ad4a..64db5e86672fa3710cd8f2864f9fd661741a8f3b 100644 (file)
@@ -126,9 +126,7 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,
                                rc = cl_file_inode_init(inode, md);
                        }
                        if (rc != 0) {
-                               make_bad_inode(inode);
-                               unlock_new_inode(inode);
-                               iput(inode);
+                               iget_failed(inode);
                                inode = ERR_PTR(rc);
                        } else
                                unlock_new_inode(inode);
index e2e47ba5d313a5f2aca58589e08d2d3df969bed2..92c5dae576b1eaad1ba67f41e126f189ead2ba73 100644 (file)
@@ -282,9 +282,7 @@ ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,
        if (rc) {
                ecryptfs_do_unlink(directory_inode, ecryptfs_dentry,
                                   ecryptfs_inode);
-               make_bad_inode(ecryptfs_inode);
-               unlock_new_inode(ecryptfs_inode);
-               iput(ecryptfs_inode);
+               iget_failed(ecryptfs_inode);
                goto out;
        }
        unlock_new_inode(ecryptfs_inode);