CID
1150562
tmem_rwlock is unnecessary in tmem_relinquish_pages(), as
such lock is used as gate for hypercalls. However
tmem_relinquish_pages deals with pages that are no longer
owned by any domain - hence there is no need for tmem_rwlock.
Also the function is protected by the 'heap_lock' which
is the only calleer of this function.
This patch drops said lock.
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
return NULL;
}
- if ( memflags & MEMF_tmem )
- read_lock(&tmem_rwlock);
-
while ( (pfp = tmem_page_list_get()) == NULL )
{
if ( (max_evictions-- <= 0) || !tmem_evict())
relinq_pgs++;
}
- if ( memflags & MEMF_tmem )
- read_unlock(&tmem_rwlock);
-
return pfp;
}