diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:58 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:29 -0500 |
commit | b74c79e99389cd79b31fcc08f82c24e492e63c7e (patch) | |
tree | 763c6b412517306670bc625e90035f2d16bb739f /fs/ceph/inode.c | |
parent | 34286d6662308d82aed891852d04c7c3a2649b16 (diff) |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 47f8c8baf3b5..e61de4f7b99d 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -1781,12 +1781,17 @@ int ceph_do_getattr(struct inode *inode, int mask) | |||
1781 | * Check inode permissions. We verify we have a valid value for | 1781 | * Check inode permissions. We verify we have a valid value for |
1782 | * the AUTH cap, then call the generic handler. | 1782 | * the AUTH cap, then call the generic handler. |
1783 | */ | 1783 | */ |
1784 | int ceph_permission(struct inode *inode, int mask) | 1784 | int ceph_permission(struct inode *inode, int mask, unsigned int flags) |
1785 | { | 1785 | { |
1786 | int err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED); | 1786 | int err; |
1787 | |||
1788 | if (flags & IPERM_FLAG_RCU) | ||
1789 | return -ECHILD; | ||
1790 | |||
1791 | err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED); | ||
1787 | 1792 | ||
1788 | if (!err) | 1793 | if (!err) |
1789 | err = generic_permission(inode, mask, NULL); | 1794 | err = generic_permission(inode, mask, flags, NULL); |
1790 | return err; | 1795 | return err; |
1791 | } | 1796 | } |
1792 | 1797 | ||