diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-12-21 00:06:01 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-02-07 14:48:34 -0500 |
commit | c80c98f0dc5dc709b04254b5f30145c6ab8800a4 (patch) | |
tree | 4f48f5a96e5cd2ec8ed7a829a2fdd423bafdc7ea | |
parent | 7f5d38141e309bb4ba995d9726928af85a299c50 (diff) | |
download | linux-c80c98f0dc5dc709b04254b5f30145c6ab8800a4.tar.bz2 |
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.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/ceph/super.c | 4 | ||||
-rw-r--r-- | include/linux/ceph/libceph.h | 5 | ||||
-rw-r--r-- | net/ceph/ceph_common.c | 8 |
3 files changed, 9 insertions, 8 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 2bad9bc1fd70..0fe0aa575585 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -250,7 +250,7 @@ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc) dout("server path '%s'\n", fsopt->server_path); ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name, - pctx->copts, fc); + pctx->copts, fc->log); if (ret) return ret; @@ -268,7 +268,7 @@ static int ceph_parse_mount_param(struct fs_context *fc, unsigned int mode; int token, ret; - ret = ceph_parse_param(param, pctx->copts, fc); + ret = ceph_parse_param(param, pctx->copts, fc->log); if (ret != -ENOPARAM) return ret; diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 8fe9b80e80a5..ec73ebc4827d 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h @@ -281,11 +281,12 @@ extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid); extern void *ceph_kvmalloc(size_t size, gfp_t flags); struct fs_parameter; +struct fc_log; struct ceph_options *ceph_alloc_options(void); int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, - struct fs_context *fc); + struct fc_log *l); int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, - struct fs_context *fc); + struct fc_log *l); int ceph_print_client_options(struct seq_file *m, struct ceph_client *client, bool show_all); extern void ceph_destroy_options(struct ceph_options *opt); diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 9f8bc962985d..d435d22999f5 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c @@ -383,9 +383,9 @@ out: } int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, - struct fs_context *fc) + struct fc_log *l) { - struct p_log log = {.prefix = "libceph", .log = fc ? fc->log : NULL}; + struct p_log log = {.prefix = "libceph", .log = l}; int ret; /* ip1[:port1][,ip2[:port2]...] */ @@ -401,11 +401,11 @@ int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, EXPORT_SYMBOL(ceph_parse_mon_ips); int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, - struct fs_context *fc) + struct fc_log *l) { struct fs_parse_result result; int token, err; - struct p_log log = {.prefix = "libceph", .log = fc ? fc->log : NULL}; + struct p_log log = {.prefix = "libceph", .log = l}; token = __fs_parse(&log, &ceph_parameters, param, &result); dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); |