summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-18 23:52:18 +0100
committerSage Weil <sage@newdream.net>2009-11-19 00:02:36 +0100
commit5f44f142601bf94c448e2d463f0f18fd159da164 (patch)
tree773b4677c536519435f073b27873212f705c9c3c /fs/ceph/mds_client.c
parentceph: remove unnecessary ceph_con_shutdown (diff)
downloadlinux-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.c3
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;
}
/*