From 10183a69551f76702ac68bc74a437b25419c6de0 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 27 Apr 2015 15:33:28 +0800 Subject: ceph: check OSD caps before read/write Signed-off-by: Yan, Zheng --- fs/ceph/caps.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/ceph/caps.c') 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); -- cgit v1.2.3