[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Return an error when a schedule-setting call fails.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174650729 0
# Node ID fbe72d878196c59b5085f1e2166b3b70cf6ef4dc
# Parent  fb6395d2e97958edc25fc6a8c52d052d44d3ce34
Return an error when a schedule-setting call fails.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 xen/common/schedule.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -r fb6395d2e979 -r fbe72d878196 xen/common/schedule.c
--- a/xen/common/schedule.c     Fri Mar 23 11:32:32 2007 +0000
+++ b/xen/common/schedule.c     Fri Mar 23 11:52:09 2007 +0000
@@ -524,6 +524,7 @@ long sched_adjust(struct domain *d, stru
 long sched_adjust(struct domain *d, struct xen_domctl_scheduler_op *op)
 {
     struct vcpu *v;
+    long ret;
     
     if ( (op->sched_id != ops.sched_id) ||
          ((op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) &&
@@ -552,8 +553,8 @@ long sched_adjust(struct domain *d, stru
     if ( d == current->domain )
         vcpu_schedule_lock_irq(current);
 
-    SCHED_OP(adjust, d, op);
-    TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id);
+    if ( (ret = SCHED_OP(adjust, d, op)) == 0 )
+        TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id);
 
     if ( d == current->domain )
         vcpu_schedule_unlock_irq(current);
@@ -564,7 +565,7 @@ long sched_adjust(struct domain *d, stru
             vcpu_unpause(v);
     }
 
-    return 0;
+    return ret;
 }
 
 static void vcpu_periodic_timer_work(struct vcpu *v)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.