Use gnttab_clear_flag() to clear flags
PATCH 1/1 Use gnttab_clear_flag() to clear flags
We also add #define to catch offenders early.
Signed-off-by Jimi Xenidis <[email protected]>
---
xen/common/grant_table.c +9 -2
@@ -32,6 +32,13 @@#include <xen/guest_access.h> #include <acm/acm_hooks.h> +/* +* This file uses a special method for clearing bit in the flags called: +* gnttab_clear_flag() +* We redefine clear_bit() here to catch offenders early. +*/ +#define clear_bit (flags, ptr) please_use_gnttab_clear_flag(); +/* The first to members of a grant entry are updated as a combined * pair. The following union allows that to happen in an endian * neutral fashion. */
@@ -738,10 +745,10 @@ __release_grant_for_copy( act->pin -= GNTPIN_hstw_inc;if ( !(act->pin & GNTPIN_hstw_mask) && !readonly ) -clear_bit (_GTF_writing, &sha->flags); +gnttab_clear_flag (_GTF_writing, &sha->flags);if ( !act->pin ) -clear_bit (_GTF_reading, &sha->flags); +gnttab_clear_flag (_GTF_reading, &sha->flags);spin_unlock (&rd->grant_table->lock); }