History

ceph_parse_param(), ceph_parse_mon_ips(): switch to passing fc_log

... and now errorf() et.al. are never called with NULL fs_context, so we can get rid of conditional in those.

Al Viro committed 6 years ago

Commit c80c98f1 parent 7f5d3813 files · +9 −8Browse files

Unified · Split

3 files
  1. fs/ceph/super.c +2 −2
  2. include/linux/ceph/libceph.h +3 −2
  3. net/ceph/ceph_common.c +4 −4
fs/ceph/super.c+2−2
@@ -250,7 +250,7 @@ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc) · 249 unmodified lines
250250 dout("server path '%s'\n", fsopt->server_path);
251251
252252 ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name,
253− pctx->copts, fc);
253+ pctx->copts, fc->log);
254254 if (ret)
255255 return ret;
256256
@@ -268,7 +268,7 @@ static int ceph_parse_mount_param(struct fs_context *fc, · 11 unmodified lines
268268 unsigned int mode;
269269 int token, ret;
270270
271− ret = ceph_parse_param(param, pctx->copts, fc);
271+ ret = ceph_parse_param(param, pctx->copts, fc->log);
272272 if (ret != -ENOPARAM)
273273 return ret;
274274
include/linux/ceph/libceph.h+3−2
@@ -281,11 +281,12 @@ extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid); · 280 unmodified lines
281281 extern void *ceph_kvmalloc(size_t size, gfp_t flags);
282282
283283 struct fs_parameter;
284+struct fc_log;
284285 struct ceph_options *ceph_alloc_options(void);
285286 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);
287288 int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt,
288− struct fs_context *fc);
289+ struct fc_log *l);
289290 int ceph_print_client_options(struct seq_file *m, struct ceph_client *client,
290291 bool show_all);
291292 extern void ceph_destroy_options(struct ceph_options *opt);
net/ceph/ceph_common.c+4−4
@@ -383,9 +383,9 @@ out: · 382 unmodified lines
383383 }
384384
385385 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)
387387 {
388− struct p_log log = {.prefix = "libceph", .log = fc ? fc->log : NULL};
388+ struct p_log log = {.prefix = "libceph", .log = l};
389389 int ret;
390390
391391 /* 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
401401 EXPORT_SYMBOL(ceph_parse_mon_ips);
402402
403403 int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt,
404− struct fs_context *fc)
404+ struct fc_log *l)
405405 {
406406 struct fs_parse_result result;
407407 int token, err;
408− struct p_log log = {.prefix = "libceph", .log = fc ? fc->log : NULL};
408+ struct p_log log = {.prefix = "libceph", .log = l};
409409
410410 token = __fs_parse(&log, &ceph_parameters, param, &result);
411411 dout("%s fs_parse '%s' token %d\n", __func__, param->key, token);