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:
Родитель
b027669449
Коммит
8aa1e49ea1
|
@ -3846,8 +3846,7 @@ out:
|
||||||
btrfs_end_transaction(trans);
|
btrfs_end_transaction(trans);
|
||||||
btrfs_btree_balance_dirty(fs_info);
|
btrfs_btree_balance_dirty(fs_info);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (inode)
|
iput(inode);
|
||||||
iput(inode);
|
|
||||||
inode = ERR_PTR(err);
|
inode = ERR_PTR(err);
|
||||||
}
|
}
|
||||||
return inode;
|
return inode;
|
||||||
|
|
|
@ -894,8 +894,7 @@ update_inode:
|
||||||
btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found);
|
btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found);
|
||||||
ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
|
ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
|
||||||
out:
|
out:
|
||||||
if (inode)
|
iput(inode);
|
||||||
iput(inode);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче