summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-14 02:48:39 +0000
committerNick Piggin <npiggin@kernel.dk>2011-01-14 02:48:39 +0000
commit657e94b673a805b427903c5628e95348235fad06 (patch)
tree0c174e387cb5d3fd3a2b55e154219cc67b644637 /fs/nfs
parent2c6755988afc003a0332406a134fb6a1626f9b28 (diff)
downloadop-kernel-dev-657e94b673a805b427903c5628e95348235fad06.zip
op-kernel-dev-657e94b673a805b427903c5628e95348235fad06.tar.gz
nfs: add missing rcu-walk check
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d33da53..a0d8320 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1410,11 +1410,15 @@ no_open:
static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd)
{
struct dentry *parent = NULL;
- struct inode *inode = dentry->d_inode;
+ struct inode *inode;
struct inode *dir;
struct nfs_open_context *ctx;
int openflags, ret = 0;
+ if (nd->flags & LOOKUP_RCU)
+ return -ECHILD;
+
+ inode = dentry->d_inode;
if (!is_atomic_open(nd) || d_mountpoint(dentry))
goto no_open;
OpenPOWER on IntegriCloud