|
@@ -277,10 +277,11 @@ out:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-int ceph_parse_options(struct ceph_options **popt, char *options,
|
|
|
|
- const char *dev_name, const char *dev_name_end,
|
|
|
|
- int (*parse_extra_token)(char *c, void *private),
|
|
|
|
- void *private)
|
|
|
|
|
|
+struct ceph_options *
|
|
|
|
+ceph_parse_options(char *options, const char *dev_name,
|
|
|
|
+ const char *dev_name_end,
|
|
|
|
+ int (*parse_extra_token)(char *c, void *private),
|
|
|
|
+ void *private)
|
|
{
|
|
{
|
|
struct ceph_options *opt;
|
|
struct ceph_options *opt;
|
|
const char *c;
|
|
const char *c;
|
|
@@ -289,7 +290,7 @@ int ceph_parse_options(struct ceph_options **popt, char *options,
|
|
|
|
|
|
opt = kzalloc(sizeof(*opt), GFP_KERNEL);
|
|
opt = kzalloc(sizeof(*opt), GFP_KERNEL);
|
|
if (!opt)
|
|
if (!opt)
|
|
- return err;
|
|
|
|
|
|
+ return ERR_PTR(-ENOMEM);
|
|
opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr),
|
|
opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr),
|
|
GFP_KERNEL);
|
|
GFP_KERNEL);
|
|
if (!opt->mon_addr)
|
|
if (!opt->mon_addr)
|
|
@@ -412,12 +413,11 @@ int ceph_parse_options(struct ceph_options **popt, char *options,
|
|
}
|
|
}
|
|
|
|
|
|
/* success */
|
|
/* success */
|
|
- *popt = opt;
|
|
|
|
- return 0;
|
|
|
|
|
|
+ return opt;
|
|
|
|
|
|
out:
|
|
out:
|
|
ceph_destroy_options(opt);
|
|
ceph_destroy_options(opt);
|
|
- return err;
|
|
|
|
|
|
+ return ERR_PTR(err);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(ceph_parse_options);
|
|
EXPORT_SYMBOL(ceph_parse_options);
|
|
|
|
|