vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
since commit
15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
lists on domain creation"), but the callers test for -ENOSYS.
Correct the callers.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
/* We're paging. There should be a ring */
int rc = vm_event_claim_slot(d, d->vm_event_paging);
- if ( rc == -ENOSYS )
+
+ if ( rc == -EOPNOTSUPP )
{
gdprintk(XENLOG_ERR, "Domain %hu paging gfn %lx yet no ring "
"in place\n", d->domain_id, gfn_l);
{
case 0:
break;
- case -ENOSYS:
+ case -EOPNOTSUPP:
/*
* If there was no ring to handle the event, then
* simply continue executing normally.
/* The parameter defaults to zero, and it should be
* set to something */
if ( ring_gfn == 0 )
- return -ENOSYS;
+ return -EOPNOTSUPP;
vm_event_ring_lock_init(*ved);
vm_event_ring_lock(*ved);
unsigned int avail_req;
if ( !ved->ring_page )
- return -ENOSYS;
+ return -EOPNOTSUPP;
vm_event_ring_lock(ved);
* this function will always return 0 for a guest. For a non-guest, we check
* for space and return -EBUSY if the ring is not available.
*
- * Return codes: -ENOSYS: the ring is not yet configured
+ * Return codes: -EOPNOTSUPP: the ring is not yet configured
* -EBUSY: the ring is busy
* 0: a spot has been reserved
*