... and now errorf() et.al. are never called with NULL fs_context, so we can get rid of conditional in those.
Unified · Split
| @@ -250,7 +250,7 @@ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc) · 249 unmodified lines | |||
| 250 | dout("server path '%s'\n", fsopt->server_path); | 250 | dout("server path '%s'\n", fsopt->server_path); |
| 251 | 251 | ||
| 252 | ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name, | 252 | ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name, |
| 253 | pctx->copts, fc); | 253 | pctx->copts, fc->log); |
| 254 | if (ret) | 254 | if (ret) |
| 255 | return ret; | 255 | return ret; |
| 256 | 256 | ||
| @@ -268,7 +268,7 @@ static int ceph_parse_mount_param(struct fs_context *fc, · 11 unmodified lines | |||
| 268 | unsigned int mode; | 268 | unsigned int mode; |
| 269 | int token, ret; | 269 | int token, ret; |
| 270 | 270 | ||
| 271 | ret = ceph_parse_param(param, pctx->copts, fc); | 271 | ret = ceph_parse_param(param, pctx->copts, fc->log); |
| 272 | if (ret != -ENOPARAM) | 272 | if (ret != -ENOPARAM) |
| 273 | return ret; | 273 | return ret; |
| 274 | 274 | ||
| @@ -281,11 +281,12 @@ extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid); · 280 unmodified lines | |||
| 281 | extern void *ceph_kvmalloc(size_t size, gfp_t flags); | 281 | extern void *ceph_kvmalloc(size_t size, gfp_t flags); |
| 282 | 282 | ||
| 283 | struct fs_parameter; | 283 | struct fs_parameter; |
| 284 | struct fc_log; | ||
| 284 | struct ceph_options *ceph_alloc_options(void); | 285 | struct ceph_options *ceph_alloc_options(void); |
| 285 | int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, | 286 | int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, |
| 286 | struct fs_context *fc); | 287 | struct fc_log *l); |
| 287 | int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, | 288 | int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, |
| 288 | struct fs_context *fc); | 289 | struct fc_log *l); |
| 289 | int ceph_print_client_options(struct seq_file *m, struct ceph_client *client, | 290 | int ceph_print_client_options(struct seq_file *m, struct ceph_client *client, |
| 290 | bool show_all); | 291 | bool show_all); |
| 291 | extern void ceph_destroy_options(struct ceph_options *opt); | 292 | extern void ceph_destroy_options(struct ceph_options *opt); |
| @@ -383,9 +383,9 @@ out: · 382 unmodified lines | |||
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, | 385 | int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, |
| 386 | struct fs_context *fc) | 386 | struct fc_log *l) |
| 387 | { | 387 | { |
| 388 | struct p_log log = {.prefix = "libceph", .log = fc ? fc->log : NULL}; | 388 | struct p_log log = {.prefix = "libceph", .log = l}; |
| 389 | int ret; | 389 | int ret; |
| 390 | 390 | ||
| 391 | /* ip1[:port1][,ip2[:port2]...] */ | 391 | /* ip1[:port1][,ip2[:port2]...] */ |
| @@ -401,11 +401,11 @@ int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, · 9 unmodified lines | |||
| 401 | EXPORT_SYMBOL(ceph_parse_mon_ips); | 401 | EXPORT_SYMBOL(ceph_parse_mon_ips); |
| 402 | 402 | ||
| 403 | int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, | 403 | int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, |
| 404 | struct fs_context *fc) | 404 | struct fc_log *l) |
| 405 | { | 405 | { |
| 406 | struct fs_parse_result result; | 406 | struct fs_parse_result result; |
| 407 | int token, err; | 407 | int token, err; |
| 408 | struct p_log log = {.prefix = "libceph", .log = fc ? fc->log : NULL}; | 408 | struct p_log log = {.prefix = "libceph", .log = l}; |
| 409 | 409 | ||
| 410 | token = __fs_parse(&log, &ceph_parameters, param, &result); | 410 | token = __fs_parse(&log, &ceph_parameters, param, &result); |
| 411 | dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); | 411 | dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); |