Signed-off-by: Steven Smith <steven.smith@eu.citrix.com>
if ( unlikely((h = t->maptrack_head) == (t->maptrack_limit - 1)) )
return -1;
t->maptrack_head = maptrack_entry(t, h).ref;
- t->map_count++;
return h;
}
{
maptrack_entry(t, handle).ref = t->maptrack_head;
t->maptrack_head = handle;
- t->map_count--;
}
static inline int
struct grant_mapping **maptrack;
unsigned int maptrack_head;
unsigned int maptrack_limit;
- unsigned int map_count;
/* Lock protecting updates to active and shared grant tables. */
spinlock_t lock;
};