]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/user_namespace.h
autofs4: cleanup autofs mount type usage
[linux-2.6-omap-h63xx.git] / include / linux / user_namespace.h
index 92a45867ecfb743d47ab962fabe90a4af11b1573..b5f41d4c2eec71a3d3c786128f0f980f0b41317d 100644 (file)
@@ -4,13 +4,14 @@
 #include <linux/kref.h>
 #include <linux/nsproxy.h>
 #include <linux/sched.h>
+#include <linux/err.h>
 
 #define UIDHASH_BITS   (CONFIG_BASE_SMALL ? 3 : 8)
 #define UIDHASH_SZ     (1 << UIDHASH_BITS)
 
 struct user_namespace {
        struct kref             kref;
-       struct list_head        uidhash_table[UIDHASH_SZ];
+       struct hlist_head       uidhash_table[UIDHASH_SZ];
        struct user_struct      *root_user;
 };
 
@@ -45,7 +46,10 @@ static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
 static inline struct user_namespace *copy_user_ns(int flags,
                                                  struct user_namespace *old_ns)
 {
-       return NULL;
+       if (flags & CLONE_NEWUSER)
+               return ERR_PTR(-EINVAL);
+
+       return old_ns;
 }
 
 static inline void put_user_ns(struct user_namespace *ns)