[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1331038601-20353-5-git-send-email-miklos@szeredi.hu>
Date: Tue, 6 Mar 2012 13:56:36 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: viro@...IV.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
hch@...radead.org, mszeredi@...e.cz
Subject: [PATCH 4/9] vfs: don't revalidate just looked up dentry
From: Miklos Szeredi <mszeredi@...e.cz>
__lookup_hash() calls ->lookup() if the dentry needs lookup and on success
revalidates the dentry (all under dir->i_mutex).
While this is harmless it doesn't make a lot of sense.
Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
---
fs/namei.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 599e4a0..c93ea6d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1746,9 +1746,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
* __lookup_hash is called with the parent dir's i_mutex already
* held, so we are good to go here.
*/
- dentry = d_inode_lookup(base, dentry, nd);
- if (IS_ERR(dentry))
- return dentry;
+ return d_inode_lookup(base, dentry, nd);
}
if (dentry && (dentry->d_flags & DCACHE_OP_REVALIDATE)) {
--
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists