]> asedeno.scripts.mit.edu Git - linux.git/commit
iommu/iova: Consolidate code for adding new node to iovad domain rbtree
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 24 Feb 2017 11:13:37 +0000 (12:13 +0100)
committerJoerg Roedel <jroedel@suse.de>
Tue, 21 Mar 2017 13:58:18 +0000 (14:58 +0100)
commitd751751a9f7f2f8e406d5a09565d337f009835d6
treeb5ed3a1536a8e0418dd738a17ad356d0eba882e7
parent97da3854c526d3a6ee05c849c96e48d21527606c
iommu/iova: Consolidate code for adding new node to iovad domain rbtree

This patch consolidates almost the same code used in iova_insert_rbtree()
and __alloc_and_insert_iova_range() functions. While touching this code,
replace BUG() with WARN_ON(1) to avoid taking down the whole system in
case of corrupted iova tree or incorrect calls.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c