For short-lived references rcu_lock_domain() is the better (slightly
cheaper) alternative.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
{
d2 = chn1->u.interdomain.remote_dom;
- /* If we unlock d1 then we could lose d2. Must get a reference. */
- if ( unlikely(!get_domain(d2)) )
- BUG();
+ /* If we unlock d1 then we could lose d2. */
+ rcu_lock_domain(d2);
if ( d1 < d2 )
{
{
if ( d1 != d2 )
spin_unlock(&d2->event_lock);
- put_domain(d2);
+ rcu_unlock_domain(d2);
}
spin_unlock(&d1->event_lock);