backported vs2.1.x fix to irq handling, which caused incorrect scheduler behavior
[linux-2.6.git] / kernel / vserver / sched.c
index 5aae959..b76a72c 100644 (file)
@@ -10,8 +10,8 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>
+#include <linux/vs_base.h>
 #include <linux/vs_context.h>
 #include <linux/vs_sched.h>
 #include <linux/vserver/sched_cmd.h>
@@ -243,7 +243,7 @@ int vx_effective_vavavoom(struct vx_info *vxi, int max_prio)
                vavavoom = 0;
 
        vxi->sched.vavavoom = vavavoom;
-       return vavavoom;
+       return vavavoom + vxi->sched.priority_bias;
 }
 
 
@@ -255,9 +255,9 @@ int vc_set_sched_v2(uint32_t xid, void __user *data)
        if (copy_from_user (&vc_data, data, sizeof(vc_data)))
                return -EFAULT;
 
-       vxi = locate_vx_info(xid);
+       vxi = lookup_vx_info(xid);
        if (!vxi)
-               return -EINVAL;
+               return -ESRCH;
 
        spin_lock(&vxi->sched.tokens_lock);
 
@@ -303,9 +303,9 @@ int vc_set_sched(uint32_t xid, void __user *data)
        if (copy_from_user (&vc_data, data, sizeof(vc_data)))
                return -EFAULT;
 
-       vxi = locate_vx_info(xid);
+       vxi = lookup_vx_info(xid);
        if (!vxi)
-               return -EINVAL;
+               return -ESRCH;
 
        set_mask = vc_data.set_mask;