diff options
author | Sage Weil <sage@newdream.net> | 2009-11-18 17:52:18 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-18 18:02:36 -0500 |
commit | 5f44f142601bf94c448e2d463f0f18fd159da164 (patch) | |
tree | 773b4677c536519435f073b27873212f705c9c3c /fs/ceph/mds_client.c | |
parent | 71ececdacae24be333c534869cb1b06357f0e215 (diff) |
ceph: handle errors during osd client init
Unwind initializing if we get ENOMEM during client initialization.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index fdecf9984180..69feeb1c9819 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -2552,7 +2552,7 @@ static void delayed_work(struct work_struct *work) | |||
2552 | } | 2552 | } |
2553 | 2553 | ||
2554 | 2554 | ||
2555 | void ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client) | 2555 | int ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client) |
2556 | { | 2556 | { |
2557 | mdsc->client = client; | 2557 | mdsc->client = client; |
2558 | mutex_init(&mdsc->mutex); | 2558 | mutex_init(&mdsc->mutex); |
@@ -2582,6 +2582,7 @@ void ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client) | |||
2582 | init_waitqueue_head(&mdsc->cap_flushing_wq); | 2582 | init_waitqueue_head(&mdsc->cap_flushing_wq); |
2583 | spin_lock_init(&mdsc->dentry_lru_lock); | 2583 | spin_lock_init(&mdsc->dentry_lru_lock); |
2584 | INIT_LIST_HEAD(&mdsc->dentry_lru); | 2584 | INIT_LIST_HEAD(&mdsc->dentry_lru); |
2585 | return 0; | ||
2585 | } | 2586 | } |
2586 | 2587 | ||
2587 | /* | 2588 | /* |