Skip to content

Commit c80c98f

Browse files
author
Al Viro
committed
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 <[email protected]>
1 parent 7f5d381 commit c80c98f

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

fs/ceph/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc)
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,
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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,12 @@ extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid);
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,9 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name,
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,
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);

0 commit comments

Comments
 (0)