diff options
Diffstat (limited to 'fs/ceph')
| -rw-r--r-- | fs/ceph/mds_client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 3a555b604441..b50044374947 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
| @@ -3575,7 +3575,6 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc) | |||
| 3575 | if (!mdsc) | 3575 | if (!mdsc) |
| 3576 | return -ENOMEM; | 3576 | return -ENOMEM; |
| 3577 | mdsc->fsc = fsc; | 3577 | mdsc->fsc = fsc; |
| 3578 | fsc->mdsc = mdsc; | ||
| 3579 | mutex_init(&mdsc->mutex); | 3578 | mutex_init(&mdsc->mutex); |
| 3580 | mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS); | 3579 | mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS); |
| 3581 | if (!mdsc->mdsmap) { | 3580 | if (!mdsc->mdsmap) { |
| @@ -3583,6 +3582,7 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc) | |||
| 3583 | return -ENOMEM; | 3582 | return -ENOMEM; |
| 3584 | } | 3583 | } |
| 3585 | 3584 | ||
| 3585 | fsc->mdsc = mdsc; | ||
| 3586 | init_completion(&mdsc->safe_umount_waiters); | 3586 | init_completion(&mdsc->safe_umount_waiters); |
| 3587 | init_waitqueue_head(&mdsc->session_close_wq); | 3587 | init_waitqueue_head(&mdsc->session_close_wq); |
| 3588 | INIT_LIST_HEAD(&mdsc->waiting_for_map); | 3588 | INIT_LIST_HEAD(&mdsc->waiting_for_map); |
| @@ -3861,6 +3861,9 @@ void ceph_mdsc_destroy(struct ceph_fs_client *fsc) | |||
| 3861 | struct ceph_mds_client *mdsc = fsc->mdsc; | 3861 | struct ceph_mds_client *mdsc = fsc->mdsc; |
| 3862 | dout("mdsc_destroy %p\n", mdsc); | 3862 | dout("mdsc_destroy %p\n", mdsc); |
| 3863 | 3863 | ||
| 3864 | if (!mdsc) | ||
| 3865 | return; | ||
| 3866 | |||
| 3864 | /* flush out any connection work with references to us */ | 3867 | /* flush out any connection work with references to us */ |
| 3865 | ceph_msgr_flush(); | 3868 | ceph_msgr_flush(); |
| 3866 | 3869 | ||
