Commit 4319fa1
KVM: x86: Use guard() instead of mutex_lock() to simplify code
Use guard(mutex) instead of mutex_lock/mutex_unlock pair to simplify the
error handling when allocating the APIC access page.
No functional change intended.
Signed-off-by: Liao Yuanhong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[sean: add blank link to isolate guard(), tweak changelog]
Signed-off-by: Sean Christopherson <[email protected]>1 parent 06dc910 commit 4319fa1
1 file changed
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2747 | 2747 | | |
2748 | 2748 | | |
2749 | 2749 | | |
2750 | | - | |
2751 | 2750 | | |
2752 | | - | |
| 2751 | + | |
| 2752 | + | |
2753 | 2753 | | |
2754 | 2754 | | |
2755 | | - | |
| 2755 | + | |
2756 | 2756 | | |
2757 | 2757 | | |
2758 | 2758 | | |
2759 | | - | |
2760 | | - | |
2761 | | - | |
2762 | | - | |
| 2759 | + | |
| 2760 | + | |
2763 | 2761 | | |
2764 | 2762 | | |
2765 | | - | |
2766 | | - | |
2767 | | - | |
| 2763 | + | |
| 2764 | + | |
2768 | 2765 | | |
2769 | 2766 | | |
2770 | 2767 | | |
| |||
0 commit comments