summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJean Sacren <sakiwit@gmail.com>2021-10-11 08:45:24 +0200
committerIlya Dryomov <idryomov@gmail.com>2021-11-08 03:29:51 +0100
commita341131eb31e55c31f61c038f152a66634d16095 (patch)
treeb7e6eb8f1ff1468c8e6a58e9b70bcd64e1c5d21f /net
parentceph: convert to noop_direct_IO (diff)
downloadlinux-a341131eb31e55c31f61c038f152a66634d16095.tar.xz
linux-a341131eb31e55c31f61c038f152a66634d16095.zip
libceph: drop ->monmap and err initialization
Call to build_initial_monmap() is one stone two birds. Explicitly it initializes err variable. Implicitly it initializes ->monmap via call to kzalloc(). We should only declare err and ->monmap is taken care of by ceph_monc_init() prototype. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/mon_client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 013cbdb6cfe2..6a6898ee4049 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -1153,12 +1153,11 @@ static int build_initial_monmap(struct ceph_mon_client *monc)
int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
{
- int err = 0;
+ int err;
dout("init\n");
memset(monc, 0, sizeof(*monc));
monc->client = cl;
- monc->monmap = NULL;
mutex_init(&monc->mutex);
err = build_initial_monmap(monc);