@@ -3846,8 +3846,7 @@ struct inode *create_reloc_inode(struct btrfs_fs_info *fs_info,
btrfs_end_transaction(trans);
btrfs_btree_balance_dirty(fs_info);
if (err) {
- if (inode)
- iput(inode);
+ iput(inode);
inode = ERR_PTR(err);
}
return inode;
@@ -894,8 +894,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found);
ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
out:
- if (inode)
- iput(inode);
+ iput(inode);
return ret;
}
@@ -401,8 +401,7 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
out_err:
if (server->ops->close)
server->ops->close(xid, tcon, fid);
- if (newinode)
- iput(newinode);
+ iput(newinode);
goto out;
}
@@ -119,8 +119,7 @@ static int efivarfs_create(struct user_namespace *mnt_userns, struct inode *dir,
out:
if (err) {
kfree(var);
- if (inode)
- iput(inode);
+ iput(inode);
}
return err;
}
@@ -1659,8 +1659,7 @@ static int ext4_fc_replay_create(struct super_block *sb, struct ext4_fc_tl *tl,
set_nlink(inode, 1);
ext4_mark_inode_dirty(NULL, inode);
out:
- if (inode)
- iput(inode);
+ iput(inode);
return ret;
}
@@ -3363,8 +3363,7 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
err = ext4_add_nondir(handle, dentry, &inode);
if (handle)
ext4_journal_stop(handle);
- if (inode)
- iput(inode);
+ iput(inode);
goto out_free_encrypted_link;
err_drop_inode:
@@ -1451,8 +1451,7 @@ extern void free_local_statfs_inodes(struct gfs2_sbd *sdp)
list_for_each_entry_safe(lsi, safe, &sdp->sd_sc_inodes_list, si_list) {
if (lsi->si_jid == sdp->sd_jdesc->jd_jid)
sdp->sd_sc_inode = NULL; /* belongs to this node */
- if (lsi->si_sc_inode)
- iput(lsi->si_sc_inode);
+ iput(lsi->si_sc_inode);
list_del(&lsi->si_list);
kfree(lsi);
}
@@ -4214,8 +4214,7 @@ int do_unlinkat(int dfd, struct filename *name)
dput(dentry);
}
inode_unlock(path.dentry->d_inode);
- if (inode)
- iput(inode); /* truncate the inode here */
+ iput(inode); /* truncate the inode here */
inode = NULL;
if (delegated_inode) {
error = break_deleg_wait(&delegated_inode);