diff options
author | Sage Weil <sage@newdream.net> | 2009-11-19 01:52:18 +0300 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-19 02:02:36 +0300 |
commit | 5f44f142601bf94c448e2d463f0f18fd159da164 (patch) | |
tree | 773b4677c536519435f073b27873212f705c9c3c /fs/ceph/mds_client.c | |
parent | 71ececdacae24be333c534869cb1b06357f0e215 (diff) | |
download | linux-5f44f142601bf94c448e2d463f0f18fd159da164.tar.xz |
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; } /* |