diff options
author | Sage Weil <sage@newdream.net> | 2009-11-18 23:52:18 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-19 00:02:36 +0100 |
commit | 5f44f142601bf94c448e2d463f0f18fd159da164 (patch) | |
tree | 773b4677c536519435f073b27873212f705c9c3c /fs/ceph/mds_client.c | |
parent | ceph: remove unnecessary ceph_con_shutdown (diff) | |
download | linux-5f44f142601bf94c448e2d463f0f18fd159da164.tar.xz linux-5f44f142601bf94c448e2d463f0f18fd159da164.zip |
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) } -void ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client) +int ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client) { mdsc->client = client; mutex_init(&mdsc->mutex); @@ -2582,6 +2582,7 @@ void ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client) init_waitqueue_head(&mdsc->cap_flushing_wq); spin_lock_init(&mdsc->dentry_lru_lock); INIT_LIST_HEAD(&mdsc->dentry_lru); + return 0; } /* |