diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 17:49:58 +1100 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 17:50:29 +1100 |
commit | b74c79e99389cd79b31fcc08f82c24e492e63c7e (patch) | |
tree | 763c6b412517306670bc625e90035f2d16bb739f /fs/nfs | |
parent | 34286d6662308d82aed891852d04c7c3a2649b16 (diff) | |
download | linux-3.10-b74c79e99389cd79b31fcc08f82c24e492e63c7e.tar.gz linux-3.10-b74c79e99389cd79b31fcc08f82c24e492e63c7e.tar.bz2 linux-3.10-b74c79e99389cd79b31fcc08f82c24e492e63c7e.zip |
fs: provide rcu-walk aware permission i_ops
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 58beace14b1..d33da530097 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2189,11 +2189,14 @@ int nfs_may_open(struct inode *inode, struct rpc_cred *cred, int openflags) return nfs_do_access(inode, cred, nfs_open_permission_mask(openflags)); } -int nfs_permission(struct inode *inode, int mask) +int nfs_permission(struct inode *inode, int mask, unsigned int flags) { struct rpc_cred *cred; int res = 0; + if (flags & IPERM_FLAG_RCU) + return -ECHILD; + nfs_inc_stats(inode, NFSIOS_VFSACCESS); if ((mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) @@ -2241,7 +2244,7 @@ out: out_notsup: res = nfs_revalidate_inode(NFS_SERVER(inode), inode); if (res == 0) - res = generic_permission(inode, mask, NULL); + res = generic_permission(inode, mask, flags, NULL); goto out; } |