Merge branch 'pm-cpufreq'
[cascardo/linux.git] / ipc / namespace.c
index 7309142..0abdea4 100644 (file)
@@ -33,7 +33,7 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
        struct ucounts *ucounts;
        int err;
 
-       err = -ENFILE;
+       err = -ENOSPC;
        ucounts = inc_ipc_namespaces(user_ns);
        if (!ucounts)
                goto fail;
@@ -188,10 +188,16 @@ static int ipcns_install(struct nsproxy *nsproxy, struct ns_common *new)
        return 0;
 }
 
+static struct user_namespace *ipcns_owner(struct ns_common *ns)
+{
+       return to_ipc_ns(ns)->user_ns;
+}
+
 const struct proc_ns_operations ipcns_operations = {
        .name           = "ipc",
        .type           = CLONE_NEWIPC,
        .get            = ipcns_get,
        .put            = ipcns_put,
        .install        = ipcns_install,
+       .owner          = ipcns_owner,
 };