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/btrfs/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/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 63e4546b478a..5cf0db0081f9 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -7211,11 +7211,14 @@ static int btrfs_set_page_dirty(struct page *page) | |||
7211 | return __set_page_dirty_nobuffers(page); | 7211 | return __set_page_dirty_nobuffers(page); |
7212 | } | 7212 | } |
7213 | 7213 | ||
7214 | static int btrfs_permission(struct inode *inode, int mask) | 7214 | static int btrfs_permission(struct inode *inode, int mask, unsigned int flags) |
7215 | { | 7215 | { |
7216 | if (flags & IPERM_FLAG_RCU) | ||
7217 | return -ECHILD; | ||
7218 | |||
7216 | if ((BTRFS_I(inode)->flags & BTRFS_INODE_READONLY) && (mask & MAY_WRITE)) | 7219 | if ((BTRFS_I(inode)->flags & BTRFS_INODE_READONLY) && (mask & MAY_WRITE)) |
7217 | return -EACCES; | 7220 | return -EACCES; |
7218 | return generic_permission(inode, mask, btrfs_check_acl); | 7221 | return generic_permission(inode, mask, flags, btrfs_check_acl); |
7219 | } | 7222 | } |
7220 | 7223 | ||
7221 | static const struct inode_operations btrfs_dir_inode_operations = { | 7224 | static const struct inode_operations btrfs_dir_inode_operations = { |