diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-02 18:47:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-02 18:47:33 -0500 |
commit | 6c073a7ee250118b8be3a2379c96fd7f78382b06 (patch) | |
tree | b398bd9cad821a3543df835e5a0110f270acafb9 /net | |
parent | ff05f603c3238010769787f3ba54c48c290ed3e5 (diff) | |
parent | d23a4b3fd6ef70b80411b39b8c8bc548a219ce70 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
rbd: fix safety of rbd_put_client()
rbd: fix a memory leak in rbd_get_client()
ceph: create a new session lock to avoid lock inversion
ceph: fix length validation in parse_reply_info()
ceph: initialize client debugfs outside of monc->mutex
ceph: change "ceph.layout" xattr to be "ceph.file.layout"
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/ceph_common.c | 2 | ||||
-rw-r--r-- | net/ceph/mon_client.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 97f70e50ad3b..761ad9d6cc3b 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c | |||
@@ -85,8 +85,6 @@ int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid) | |||
85 | } else { | 85 | } else { |
86 | pr_info("client%lld fsid %pU\n", ceph_client_id(client), fsid); | 86 | pr_info("client%lld fsid %pU\n", ceph_client_id(client), fsid); |
87 | memcpy(&client->fsid, fsid, sizeof(*fsid)); | 87 | memcpy(&client->fsid, fsid, sizeof(*fsid)); |
88 | ceph_debugfs_client_init(client); | ||
89 | client->have_fsid = true; | ||
90 | } | 88 | } |
91 | return 0; | 89 | return 0; |
92 | } | 90 | } |
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 0b62deae42bd..1845cde26227 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c | |||
@@ -8,8 +8,8 @@ | |||
8 | 8 | ||
9 | #include <linux/ceph/mon_client.h> | 9 | #include <linux/ceph/mon_client.h> |
10 | #include <linux/ceph/libceph.h> | 10 | #include <linux/ceph/libceph.h> |
11 | #include <linux/ceph/debugfs.h> | ||
11 | #include <linux/ceph/decode.h> | 12 | #include <linux/ceph/decode.h> |
12 | |||
13 | #include <linux/ceph/auth.h> | 13 | #include <linux/ceph/auth.h> |
14 | 14 | ||
15 | /* | 15 | /* |
@@ -340,8 +340,19 @@ static void ceph_monc_handle_map(struct ceph_mon_client *monc, | |||
340 | client->monc.monmap = monmap; | 340 | client->monc.monmap = monmap; |
341 | kfree(old); | 341 | kfree(old); |
342 | 342 | ||
343 | if (!client->have_fsid) { | ||
344 | client->have_fsid = true; | ||
345 | mutex_unlock(&monc->mutex); | ||
346 | /* | ||
347 | * do debugfs initialization without mutex to avoid | ||
348 | * creating a locking dependency | ||
349 | */ | ||
350 | ceph_debugfs_client_init(client); | ||
351 | goto out_unlocked; | ||
352 | } | ||
343 | out: | 353 | out: |
344 | mutex_unlock(&monc->mutex); | 354 | mutex_unlock(&monc->mutex); |
355 | out_unlocked: | ||
345 | wake_up_all(&client->auth_wq); | 356 | wake_up_all(&client->auth_wq); |
346 | } | 357 | } |
347 | 358 | ||