Displaying 2 results from an estimated 2 matches for "_gnttab_end_foreign_access_ref".
Did you mean:
gnttab_end_foreign_access_ref
2012 Mar 09
2
[PATCH] linux-2.6.18/gnttab: add deferred freeing logic
...mer.h>
#include <xen/interface/xen.h>
#include <xen/gnttab.h>
#include <asm/pgtable.h>
@@ -183,35 +184,119 @@ int gnttab_query_foreign_access(grant_re
}
EXPORT_SYMBOL_GPL(gnttab_query_foreign_access);
-int gnttab_end_foreign_access_ref(grant_ref_t ref)
+static inline int _gnttab_end_foreign_access_ref(grant_ref_t ref)
{
u16 flags, nflags;
nflags = shared[ref].flags;
do {
- if ((flags = nflags) & (GTF_reading|GTF_writing)) {
- printk(KERN_DEBUG "WARNING: g.e. still in use!\n");
+ if ((flags = nflags) & (GTF_reading|GTF_writing))
return 0;
- }
} while ((nflags...
2012 Apr 05
0
[PATCH] xen/gnttab: add deferred freeing logic
...ags & (GTF_reading|GTF_writing))
return 0;
- }
} while ((nflags = sync_cmpxchg(pflags, flags, 0)) != flags);
return 1;
@@ -458,12 +456,103 @@ static int gnttab_end_foreign_access_ref
return 1;
}
-int gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly)
+static inline int _gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly)
{
return gnttab_interface->end_foreign_access_ref(ref, readonly);
}
+
+int gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly)
+{
+ if (_gnttab_end_foreign_access_ref(ref, readonly))
+ return 1;
+ pr_warn("WARNING: g.e. %#x still in use!\n",...