mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
iommu/amd: Clean up the cmpxchg64 invocation
Change it as it's designed for and keep it consistent with other places. Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
368d06cd53
commit
134414fffc
1 changed files with 2 additions and 1 deletions
|
@ -1342,7 +1342,8 @@ static u64 *alloc_pte(struct protection_domain *domain,
|
|||
|
||||
__npte = PM_LEVEL_PDE(level, virt_to_phys(page));
|
||||
|
||||
if (cmpxchg64(pte, __pte, __npte)) {
|
||||
/* pte could have been changed somewhere. */
|
||||
if (cmpxchg64(pte, __pte, __npte) != __pte) {
|
||||
free_page((unsigned long)page);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue