summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-04-27 15:33:28 +0800
committerIlya Dryomov <idryomov@gmail.com>2015-06-25 11:49:28 +0300
commit10183a69551f76702ac68bc74a437b25419c6de0 (patch)
tree06e48d196c31f31eef6f039bce518ff3973b2760 /fs/ceph/caps.c
parent144cba1493fdd6e3e1980e439a31df877831ebcd (diff)
downloadlinux-10183a69551f76702ac68bc74a437b25419c6de0.tar.bz2
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.c4
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);