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/caps.c | |
parent | 144cba1493fdd6e3e1980e439a31df877831ebcd (diff) |
ceph: check OSD caps before read/write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index be5ea6af8366..7c8e93aeb01e 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2233,6 +2233,10 @@ int ceph_get_caps(struct ceph_inode_info *ci, int need, int want, { int _got, check_max, ret, err = 0; + ret = ceph_pool_perm_check(ci, need); + if (ret < 0) + return ret; + retry: if (endoff > 0) check_max_size(&ci->vfs_inode, endoff); |