From 863a362490ecb05d99be700662aaea8a97c1dcf6 Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Wed, 18 Aug 2010 04:37:30 +1000 Subject: [PATCH] --- yaml --- r: 209633 b: refs/heads/master c: 2e2e88ea8c3bd9e1bd6e42faf047a4ac3fbb3b2f h: refs/heads/master i: 209631: 0f17e6f0e9b5510c86ba6f32a57b444a69807c80 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 4872ada5de34..cc9557caeb73 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a48ee8a4ad26c3a538b6fc11a86a8f80c3dce18 +refs/heads/master: 2e2e88ea8c3bd9e1bd6e42faf047a4ac3fbb3b2f diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 17ea76bf2fbe..c2742b7dec59 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -709,6 +709,7 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, dentry = __d_lookup(nd->path.dentry, name); if (!dentry) goto need_lookup; +found: if (dentry->d_op && dentry->d_op->d_revalidate) goto need_revalidate; done: @@ -766,14 +767,7 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, * we waited on the semaphore. Need to revalidate. */ mutex_unlock(&dir->i_mutex); - if (dentry->d_op && dentry->d_op->d_revalidate) { - dentry = do_revalidate(dentry, nd); - if (!dentry) - dentry = ERR_PTR(-ENOENT); - } - if (IS_ERR(dentry)) - goto fail; - goto done; + goto found; need_revalidate: dentry = do_revalidate(dentry, nd);