... 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 | 250 | dout("server path '%s'\n", fsopt->server_path); |
| 251 | 251 | |
| 252 | 252 | ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name, |
| 253 | − pctx->copts, fc); | |
| 253 | + pctx->copts, fc->log); | |
| 254 | 254 | if (ret) |
| 255 | 255 | return ret; |
| 256 | 256 | |
| @@ -268,7 +268,7 @@ static int ceph_parse_mount_param(struct fs_context *fc, · 11 unmodified lines | ||
| 268 | 268 | unsigned int mode; |
| 269 | 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 | 272 | if (ret != -ENOPARAM) |
| 273 | 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 | 281 | extern void *ceph_kvmalloc(size_t size, gfp_t flags); |
| 282 | 282 | |
| 283 | 283 | struct fs_parameter; |
| 284 | +struct fc_log; | |
| 284 | 285 | struct ceph_options *ceph_alloc_options(void); |
| 285 | 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 | 288 | int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, |
| 288 | − struct fs_context *fc); | |
| 289 | + struct fc_log *l); | |
| 289 | 290 | int ceph_print_client_options(struct seq_file *m, struct ceph_client *client, |
| 290 | 291 | bool show_all); |
| 291 | 292 | extern void ceph_destroy_options(struct ceph_options *opt); |
| @@ -383,9 +383,9 @@ out: · 382 unmodified lines | ||
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 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 | 389 | int ret; |
| 390 | 390 | |
| 391 | 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 | 401 | EXPORT_SYMBOL(ceph_parse_mon_ips); |
| 402 | 402 | |
| 403 | 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 | 406 | struct fs_parse_result result; |
| 407 | 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 | 410 | token = __fs_parse(&log, &ceph_parameters, param, &result); |
| 411 | 411 | dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); |