summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2021-07-14 15:35:51 +0530
committerIlya Dryomov <idryomov@gmail.com>2022-01-13 13:40:06 +0100
commit4153c7fc937a2afa077dbdb9fe3189b9981f423c (patch)
treede66cd33466d1861d8119318e9d658786691cdee /net
parent2d7c86a8f9cdce1408c4f3c69d94d007eff2f179 (diff)
downloadlinux-4153c7fc937a2afa077dbdb9fe3189b9981f423c.tar.bz2
libceph: rename parse_fsid() to ceph_parse_fsid() and export
... as it is too generic. also, use __func__ when logging rather than hardcoding the function name. Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/ceph_common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index 851b0c4c5730..decae43b4262 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -217,14 +217,14 @@ void *ceph_kvmalloc(size_t size, gfp_t flags)
return p;
}
-static int parse_fsid(const char *str, struct ceph_fsid *fsid)
+int ceph_parse_fsid(const char *str, struct ceph_fsid *fsid)
{
int i = 0;
char tmp[3];
int err = -EINVAL;
int d;
- dout("parse_fsid '%s'\n", str);
+ dout("%s '%s'\n", __func__, str);
tmp[2] = 0;
while (*str && i < 16) {
if (ispunct(*str)) {
@@ -244,9 +244,10 @@ static int parse_fsid(const char *str, struct ceph_fsid *fsid)
if (i == 16)
err = 0;
- dout("parse_fsid ret %d got fsid %pU\n", err, fsid);
+ dout("%s ret %d got fsid %pU\n", __func__, err, fsid);
return err;
}
+EXPORT_SYMBOL(ceph_parse_fsid);
/*
* ceph options
@@ -464,7 +465,7 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt,
break;
case Opt_fsid:
- err = parse_fsid(param->string, &opt->fsid);
+ err = ceph_parse_fsid(param->string, &opt->fsid);
if (err) {
error_plog(&log, "Failed to parse fsid: %d", err);
return err;