diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-04-27 15:33:28 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 11:49:28 +0300 |
commit | 10183a69551f76702ac68bc74a437b25419c6de0 (patch) | |
tree | 06e48d196c31f31eef6f039bce518ff3973b2760 /fs/ceph/mds_client.c | |
parent | 144cba1493fdd6e3e1980e439a31df877831ebcd (diff) | |
download | linux-10183a69551f76702ac68bc74a437b25419c6de0.tar.gz linux-10183a69551f76702ac68bc74a437b25419c6de0.tar.xz |
ceph: check OSD caps before read/write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 84f37f34f9aa..f125e06dacb8 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -3414,6 +3414,9 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc) ceph_caps_init(mdsc); ceph_adjust_min_caps(mdsc, fsc->min_caps); + init_rwsem(&mdsc->pool_perm_rwsem); + mdsc->pool_perm_tree = RB_ROOT; + return 0; } @@ -3607,6 +3610,7 @@ static void ceph_mdsc_stop(struct ceph_mds_client *mdsc) ceph_mdsmap_destroy(mdsc->mdsmap); kfree(mdsc->sessions); ceph_caps_finalize(mdsc); + ceph_pool_perm_destroy(mdsc); } void ceph_mdsc_destroy(struct ceph_fs_client *fsc) |