From 824f4facbdce7886b5916b1f2c05843c0b989266 Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Fri, 14 Jan 2011 02:35:53 +0000 Subject: [PATCH] --- yaml --- r: 230859 b: refs/heads/master c: bb20c18db6fbb5e6ba499c76473a487d35073467 h: refs/heads/master i: 230857: 13beff45de54294179357ba6693324ffcdf850e2 230855: 24c3131d604244bd9ecea2d0ceadb90aa4bf914b v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 076957b8bafc..cb7d3888a5f6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a82416da83722944d78d933301e32e7c5ad70edd +refs/heads/master: bb20c18db6fbb5e6ba499c76473a487d35073467 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 19433cdba011..0f02359ce685 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -583,6 +583,13 @@ void release_open_intent(struct nameidata *nd) fput(nd->intent.open.file); } +/* + * Call d_revalidate and handle filesystems that request rcu-walk + * to be dropped. This may be called and return in rcu-walk mode, + * regardless of success or error. If -ECHILD is returned, the caller + * must return -ECHILD back up the path walk stack so path walk may + * be restarted in ref-walk mode. + */ static int d_revalidate(struct dentry *dentry, struct nameidata *nd) { int status; @@ -673,6 +680,9 @@ force_reval_path(struct path *path, struct nameidata *nd) return 0; if (!status) { + /* Don't d_invalidate in rcu-walk mode */ + if (nameidata_drop_rcu(nd)) + return -ECHILD; d_invalidate(dentry); status = -ESTALE; }