From f2025d8b5bed39c4d28b184562dd6eb20fdba119 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 13 Jan 2012 22:22:03 -0800 Subject: [PATCH] --- yaml --- r: 287161 b: refs/heads/master c: ab434b60ab07f8c44246b6fb0cddee436687a09a h: refs/heads/master i: 287159: 23a24489df5b369e40e48b66d828998d51282b4a v: v3 --- [refs] | 2 +- trunk/net/ceph/ceph_common.c | 2 -- trunk/net/ceph/mon_client.c | 13 ++++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1c920a3d987f..987ec3f37d84 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 114fc47492e23d93653e4a16664833e98d62a563 +refs/heads/master: ab434b60ab07f8c44246b6fb0cddee436687a09a diff --git a/trunk/net/ceph/ceph_common.c b/trunk/net/ceph/ceph_common.c index 97f70e50ad3b..761ad9d6cc3b 100644 --- a/trunk/net/ceph/ceph_common.c +++ b/trunk/net/ceph/ceph_common.c @@ -85,8 +85,6 @@ int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid) } else { pr_info("client%lld fsid %pU\n", ceph_client_id(client), fsid); memcpy(&client->fsid, fsid, sizeof(*fsid)); - ceph_debugfs_client_init(client); - client->have_fsid = true; } return 0; } diff --git a/trunk/net/ceph/mon_client.c b/trunk/net/ceph/mon_client.c index 0b62deae42bd..1845cde26227 100644 --- a/trunk/net/ceph/mon_client.c +++ b/trunk/net/ceph/mon_client.c @@ -8,8 +8,8 @@ #include #include +#include #include - #include /* @@ -340,8 +340,19 @@ static void ceph_monc_handle_map(struct ceph_mon_client *monc, client->monc.monmap = monmap; kfree(old); + if (!client->have_fsid) { + client->have_fsid = true; + mutex_unlock(&monc->mutex); + /* + * do debugfs initialization without mutex to avoid + * creating a locking dependency + */ + ceph_debugfs_client_init(client); + goto out_unlocked; + } out: mutex_unlock(&monc->mutex); +out_unlocked: wake_up_all(&client->auth_wq); }