mm.h: fix BUG_ON() condition in put_page_alloc_ref()
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 16 Jul 2019 11:29:02 +0000 (13:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 16 Jul 2019 11:29:02 +0000 (13:29 +0200)
commit44a887d021de8f76183132bb5892c2c0840d3aca
treebe82e8d76fda01ade32f3f792911d4b8b304b850
parentec83f8256276c6f99dfe13bb2b56d168c080f098
mm.h: fix BUG_ON() condition in put_page_alloc_ref()

The BUG_ON() was misplaced when this function was introduced in commit
ec83f825 "mm.h: add helper function to test-and-clear _PGC_allocated".
It will fire incorrectly if _PGC_allocated is already clear on entry. Thus
it should be moved after the if statement.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/mm.h