vserver 1.9.5.x5
[linux-2.6.git] / kernel / vserver / namespace.c
index 3dc0f35..1482e62 100644 (file)
@@ -3,7 +3,7 @@
  *
  *  Virtual Server: Context Namespace Support
  *
- *  Copyright (C) 2003-2004  Herbert Pötzl
+ *  Copyright (C) 2003-2005  Herbert Pötzl
  *
  *  V0.01  broken out from context.c 0.07
  *  V0.02  added task locking for namespace
 
 #include <linux/config.h>
 #include <linux/utsname.h>
-#include <linux/vserver/namespace.h>
-#include <linux/vs_base.h>
+#include <linux/sched.h>
 #include <linux/vs_context.h>
-#include <linux/namespace.h>
+#include <linux/vserver/namespace.h>
 #include <linux/dcache.h>
+#include <linux/mount.h>
+#include <linux/fs.h>
 
 #include <asm/errno.h>
 #include <asm/uaccess.h>
@@ -57,11 +58,11 @@ int vc_set_vhi_name(uint32_t id, void __user *data)
                return -EPERM;
        if (copy_from_user (&vc_data, data, sizeof(vc_data)))
                return -EFAULT;
-       
+
        vxi = locate_vx_info(id);
        if (!vxi)
                return -ESRCH;
-       
+
        name = vx_vhi_name(vxi, vc_data.field);
        if (name)
                memcpy(name, vc_data.name, 65);
@@ -85,7 +86,7 @@ int vc_get_vhi_name(uint32_t id, void __user *data)
        name = vx_vhi_name(vxi, vc_data.field);
        if (!name)
                goto out_put;
-                       
+
        memcpy(vc_data.name, name, 65);
        if (copy_to_user (data, &vc_data, sizeof(vc_data)))
                return -EFAULT;
@@ -145,7 +146,7 @@ int vc_enter_namespace(uint32_t id, void *data)
        old_ns = current->namespace;
        old_fs = current->fs;
        get_namespace(vxi->vx_namespace);
-       current->namespace = vxi->vx_namespace; 
+       current->namespace = vxi->vx_namespace;
        current->fs = fs;
        task_unlock(current);