From 390f68609e7e5e931b714602211ab5939ae34b4a Mon Sep 17 00:00:00 2001 From: "J. R. Okajima" Date: Fri, 14 Jan 2011 03:56:04 +0000 Subject: [PATCH] --- yaml --- r: 230863 b: refs/heads/master c: f20877d94a74557b7c28b4ed8920d834c31e0ea5 h: refs/heads/master i: 230861: 925d6646fd61f7d74fb1a5a38f490779d8623783 230859: 824f4facbdce7886b5916b1f2c05843c0b989266 230855: 24c3131d604244bd9ecea2d0ceadb90aa4bf914b 230847: cfd36f9280a7ffd1a4e033f830c6db07f2f7b53d v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3fb0fe2963fb..ba5a70dc1ec2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 657e94b673a805b427903c5628e95348235fad06 +refs/heads/master: f20877d94a74557b7c28b4ed8920d834c31e0ea5 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 14c73edca9ce..bc24894c5f14 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2122,11 +2122,13 @@ static struct file *do_last(struct nameidata *nd, struct path *path, dir = nd->path.dentry; case LAST_DOT: if (need_reval_dot(dir)) { - error = d_revalidate(nd->path.dentry, nd); - if (!error) - error = -ESTALE; - if (error < 0) + int status = d_revalidate(nd->path.dentry, nd); + if (!status) + status = -ESTALE; + if (status < 0) { + error = status; goto exit; + } } /* fallthrough */ case LAST_ROOT: