summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 17:49:58 +1100
committerNick Piggin <npiggin@kernel.dk>2011-01-07 17:50:29 +1100
commitb74c79e99389cd79b31fcc08f82c24e492e63c7e (patch)
tree763c6b412517306670bc625e90035f2d16bb739f /fs/ceph/inode.c
parent34286d6662308d82aed891852d04c7c3a2649b16 (diff)
downloadop-kernel-dev-b74c79e99389cd79b31fcc08f82c24e492e63c7e.zip
op-kernel-dev-b74c79e99389cd79b31fcc08f82c24e492e63c7e.tar.gz
fs: provide rcu-walk aware permission i_ops
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 47f8c8b..e61de4f 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1781,12 +1781,17 @@ int ceph_do_getattr(struct inode *inode, int mask)
* Check inode permissions. We verify we have a valid value for
* the AUTH cap, then call the generic handler.
*/
-int ceph_permission(struct inode *inode, int mask)
+int ceph_permission(struct inode *inode, int mask, unsigned int flags)
{
- int err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED);
+ int err;
+
+ if (flags & IPERM_FLAG_RCU)
+ return -ECHILD;
+
+ err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED);
if (!err)
- err = generic_permission(inode, mask, NULL);
+ err = generic_permission(inode, mask, flags, NULL);
return err;
}
OpenPOWER on IntegriCloud