x86/p2m: also clear defer_nested_flush on error
authorJan Beulich <JBeulich@suse.com>
Tue, 15 Apr 2014 14:10:07 +0000 (15:10 +0100)
committerTim Deegan <tim@xen.org>
Thu, 24 Apr 2014 11:33:17 +0000 (12:33 +0100)
commite326b878b21931ec6f4b6c70c762c578255d2809
tree61dc83a49c011da17e1d75175b417bd0941ae7da
parentfce5281c5a7f37eb0157a32626f7184e106aafe6
x86/p2m: also clear defer_nested_flush on error

While presumably benign (domain creation ought to fail when P2M setup
fails) let's be on the safe side and clear the flag as intended. And
actually, the code can be streamlined quite a bit by recognizing that
the only difference between the success and error cases is the message
printed in each case. With that, a stray spin_unlock() also goes away.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Christoph Egger <chegger@amazon.de>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/p2m.c