Skip to contentSkip to conversation

avoid lookup_hash usage in configfs

PATCH New Christoph Hellwig 1 participant 1 message Jun 28, 2005 configfs

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avoid lookup_hash usage in configfs

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

fs/configfs/dir.c +1 -1
Index: linux-2.6.12/fs/configfs/dir.c
===================================================================
@@ -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);
fs/configfs/inode.c +0 -10
Index: linux-2.6.12/fs/configfs/inode.c
===================================================================
@@ -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
  */