summaryrefslogtreecommitdiffstats
path: root/fs/bad_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/bad_inode.c
parent34286d6662308d82aed891852d04c7c3a2649b16 (diff)
downloadlinux-b74c79e99389cd79b31fcc08f82c24e492e63c7e.tar.gz
linux-b74c79e99389cd79b31fcc08f82c24e492e63c7e.tar.bz2
linux-b74c79e99389cd79b31fcc08f82c24e492e63c7e.zip
fs: provide rcu-walk aware permission i_ops
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/bad_inode.c')
-rw-r--r--fs/bad_inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index f024d8aaddef..9ad2369d9e35 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -229,8 +229,11 @@ static int bad_inode_readlink(struct dentry *dentry, char __user *buffer,
return -EIO;
}
-static int bad_inode_permission(struct inode *inode, int mask)
+static int bad_inode_permission(struct inode *inode, int mask, unsigned int flags)
{
+ if (flags & IPERM_FLAG_RCU)
+ return -ECHILD;
+
return -EIO;
}