mirror of
https://github.com/torvalds/linux
synced 2024-09-21 11:38:48 +00:00
btrfs: remove unnecessary check of iput argument
iput() already handles NULL and non-NULL parameter, so it is not needed to check that. This unifies all iput calls. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b027669449
commit
8aa1e49ea1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue