[PATCH] avoid lookup_hash usage in configfs

From: Christoph Hellwig
Date: Tue Jun 28 2005 - 06:37:27 EST


-mm specific addon to the same kind of patches I sent a few weeks ago


Index: linux-2.6.12/fs/configfs/dir.c
===================================================================
--- linux-2.6.12.orig/fs/configfs/dir.c 2005-06-27 21:12:19.000000000 +0200
+++ linux-2.6.12/fs/configfs/dir.c 2005-06-28 13:22:36.000000000 +0200
@@ -858,7 +858,7 @@

down(&parent->d_inode->i_sem);

- new_dentry = configfs_get_dentry(parent, new_name);
+ new_dentry = lookup_one_len(new_name, parent, strlen(new_name));
if (!IS_ERR(new_dentry)) {
if (!new_dentry->d_inode) {
error = config_item_set_name(item, "%s", new_name);
Index: linux-2.6.12/fs/configfs/inode.c
===================================================================
--- linux-2.6.12.orig/fs/configfs/inode.c 2005-06-27 21:12:19.000000000 +0200
+++ linux-2.6.12/fs/configfs/inode.c 2005-06-28 13:22:43.000000000 +0200
@@ -98,16 +98,6 @@
return error;
}

-struct dentry * configfs_get_dentry(struct dentry * parent, const char * name)
-{
- struct qstr qstr;
-
- qstr.name = name;
- qstr.len = strlen(name);
- qstr.hash = full_name_hash(name,qstr.len);
- return lookup_hash(&qstr,parent);
-}
-
/*
* Get the name for corresponding element represented by the given configfs_dirent
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/