diff --git a/fs/ceph/super.c b/fs/ceph/super.c index d8b001d7edf9..6ce1c6ae48ca 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -396,13 +396,18 @@ static int ceph_parse_mon_addr(struct fs_parameter *param, { struct ceph_parse_opts_ctx *pctx = fc->fs_private; struct ceph_mount_options *fsopt = pctx->opts; + int ret; + + ret = ceph_parse_mon_ips(param->string, strlen(param->string), + pctx->copts, fc->log.log, '/'); + if (ret) + return ret; kfree(fsopt->mon_addr); fsopt->mon_addr = param->string; param->string = NULL; - return ceph_parse_mon_ips(fsopt->mon_addr, strlen(fsopt->mon_addr), - pctx->copts, fc->log.log, '/'); + return 0; } static int ceph_parse_mount_param(struct fs_context *fc,