From: Jimi Xenidis Subject: [PATCH][XEN] Use gnttab_clear_flag() to clear flags Date: Sun, 13 Aug 2006 12:50:07 -0400 Message-ID: Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org We also add #define to catch offenders early. Signed-off-by: Jimi Xenidis --- diff -r 5f92043a3ab1 xen/common/grant_table.c --- a/xen/common/grant_table.c Sun Aug 13 12:00:38 2006 -0400 +++ b/xen/common/grant_table.c Sun Aug 13 12:46:53 2006 -0400 @@ -32,6 +32,13 @@ #include #include +/* + * 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); }