Should return ESRCH rather than EINVAL if a context doesn't exist
[linux-2.6.git] / kernel / vserver / sched.c
index 5aae959..b90326c 100644 (file)
@@ -257,7 +257,7 @@ int vc_set_sched_v2(uint32_t xid, void __user *data)
 
        vxi = locate_vx_info(xid);
        if (!vxi)
-               return -EINVAL;
+               return -ESRCH;
 
        spin_lock(&vxi->sched.tokens_lock);
 
@@ -305,7 +305,7 @@ int vc_set_sched(uint32_t xid, void __user *data)
 
        vxi = locate_vx_info(xid);
        if (!vxi)
-               return -EINVAL;
+               return -ESRCH;
 
        set_mask = vc_data.set_mask;