]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ceph/ceph_common.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[karo-tx-linux.git] / net / ceph / ceph_common.c
index c236c235c4a2499e11996c38ea8e806d78e6621a..e65e6e4be38be72cff529e7d5019c908dd8f3961 100644 (file)
@@ -15,6 +15,8 @@
 #include <linux/slab.h>
 #include <linux/statfs.h>
 #include <linux/string.h>
+#include <linux/nsproxy.h>
+#include <net/net_namespace.h>
 
 
 #include <linux/ceph/ceph_features.h>
@@ -308,6 +310,9 @@ ceph_parse_options(char *options, const char *dev_name,
        int err = -ENOMEM;
        substring_t argstr[MAX_OPT_ARGS];
 
+       if (current->nsproxy->net_ns != &init_net)
+               return ERR_PTR(-EINVAL);
+
        opt = kzalloc(sizeof(*opt), GFP_KERNEL);
        if (!opt)
                return ERR_PTR(-ENOMEM);
@@ -601,10 +606,8 @@ static int __init init_ceph_lib(void)
        if (ret < 0)
                goto out_crypto;
 
-       pr_info("loaded (mon/osd proto %d/%d, osdmap %d/%d %d/%d)\n",
-               CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL,
-               CEPH_OSDMAP_VERSION, CEPH_OSDMAP_VERSION_EXT,
-               CEPH_OSDMAP_INC_VERSION, CEPH_OSDMAP_INC_VERSION_EXT);
+       pr_info("loaded (mon/osd proto %d/%d)\n",
+               CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL);
 
        return 0;